Hi guys, Just a little update for somebody who could have the same problem.
I built the test application with SQLite version 3.8.4.2 (before it was built with 3.6.17) I got the following results with the original db (with the incorrect primary key - `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT and index CREATE INDEX `IDX_event_1` ON event (`deleted`, `major`, `id`)) 2014-Mar-27 15:06:18.328872:NORM: AGENT REV: 330557:330556. TIME FOR 1000 ITERATIONS: 29457 milliseconds 2014-Mar-27 15:07:12.136686:NORM: AGENT REV: 330557:330556. TIME FOR 1000 ITERATIONS: 29320 milliseconds i.e. 10 seconds improvement per 1000 iterations only upgrading to the newest version of the SQLite. This is cool. Then I tested with the newly created db (with the proper primary key - `id` INTEGER PRIMARY KEY AUTOINCREMENT and index CREATE INDEX `IDX_event_1` ON `event` (`deleted`, `major`)) 2014-Mar-27 15:12:30.024881:NORM: AGENT REV: 330557:330556. TIME FOR 1000 ITERATIONS: 252 milliseconds 2014-Mar-27 15:12:56.819490:NORM: AGENT REV: 330557:330556. TIME FOR 1000 ITERATIONS: 239 milliseconds i.e. the results that I was hoping to see. NG query planner in action :) Thanks again to all of you who helped with this case, Pavel. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

