Ward Willats wrote: > It may or may not apply to your situation, but after doing lots of inserts, > running ANALYZE can sometimes work wonders.
As a rule of thumb, ANALYZE can help only if there are multiple ways of using indexes, and if SQLite's heuristics happen to choose the wrong one. (Also see <http://www.sqlite.org/queryplanner-ng.html#howtofix>.) Regards, Clemens