Sqlite3 rowid vs. AUTOINCREMTENT
-
03-07-2021 - |
سؤال
Im working on my second project with sqlite3 and have a question.
What is the difference between working with rowid and/or working with own AUTOINCREMENT INTEGER value?
Is one of both better/faster than the other?
المحلول
According to the Sqlite documentation the difference is that the rowid
can be reassigned, while an AUTOINCREMENT INTEGER
can not.
To quote the important part:
(T)he use of AUTOINCREMENT requires additional work to be done as each row is inserted and thus causes INSERTs to run a little slower.
لا تنتمي إلى StackOverflow