Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top