Sebastian Bermudez wrote: > > 1) > Ok, change the index to: > CREATE INDEX IF NOT EXISTS log_idx ON log (timestamp) > > column Id is not used for select... > the Id column just is needed for delete operation. > This seems to have done the trick. The SELECT query now takes ~15 ms. Much better :)
I didn't think adding the id in the index would have such consequences! I take it adding an index on id AND timestamp is definitely not the same thing than adding an index on id AND adding an index on timestamp. Thanks a lot for your help! It is much appreciated. -- View this message in context: http://www.nabble.com/Slow-SELECT-query-tp25294597p25295851.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

