*** 53,55 **** --- 53,97 ---- It would be good if people could post any performance measurements they make here. + + ----- + + 24-July-2003: + + Some performance results for pre-compiled queries. The temp db was using the in-memory backend. + + Insert 10000 records (real db) - 2036 ms + Insert 10000 records (real db, pre-compile) - 1080 ms + + Insert 10000 records (temp db) - 1563 ms + Insert 10000 records (temp db, pre-compile) - 706 ms + + Select 10000 records (real db) - 5430 ms + Select 10000 records (real db, pre-compile) - 3733 ms + + Select 10000 records (temp db) - 1766 ms + Select 10000 records (temp db, pre-compile) - 460 ms + + The schema for the test is: + + CREATE TABLE tbl( key PRIMARY KEY, val ); + + Each insert test is: + + BEGIN; + INSERT INTO tbl VALUES(1, <string about 40 chars long>); + INSERT INTO tbl VALUES(2, <string about 40 chars long>); + ... + INSERT INTO tbl VALUES(9999, <string about 40 chars long>); + INSERT INTO tbl VALUES(10000, <string about 40 chars long>); + COMMIT; + + Each select test is: + + SELECT * FROM tbl WHERE key = 1; + SELECT * FROM tbl WHERE key = 2; + ... + SELECT * FROM tbl WHERE key = 9999; + SELECT * FROM tbl WHERE key = 10000; + + If you use an INTEGER PRIMARY KEY instead of a PRIMARY KEY things are slightly faster all round. The relative benefit of pre-compiled queries is slightly increased (5-10%) as well.