You are probably falling into the cache effect trap again. There is no point in indexing on the primary key, it only wastes space and CPU cycles
-----Urspr?ngliche Nachricht----- Von: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-bounces at mailinglists.sqlite.org] Im Auftrag von ??? Gesendet: Montag, 14. Dezember 2015 13:54 An: sqlite-users at mailinglists.sqlite.org Betreff: [sqlite] Is rowid the fastest? hi, create a table using the following sql. CREATE TABLE t(x INTEGER PRIMARY KEY ASC, y, z); So the x is the alias of the rowid. Retrieving records by rowid around twice as fast as other indexs values. Because of the x is the alias of rowid, so retrieving records by x is also as fast as rowid. Is that right? In order to testing the efficiency. After I create index on t(x). And this give me a suprise, now I retrieve by x , I found that its is faster than its before. does retrieve by the rowid the fastest method? Has creating index on t(x) anything influence to do with the rowid? best regards. _______________________________________________ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick Software Engineer Scientific Games International GmbH FN 157284 a, HG Wien Klitschgasse 2-4, A-1130 Vienna, Austria Tel: +43 1 80100 0 E-Mail: hick at scigames.at This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.