On 15 Mar 2019, at 7:35am, niklas <nikba...@gmail.com> wrote: > Dropping analyze (sqlite_stat1) information from the database made > the problem go away, i.e. made sqlite use index instead of scanning.
Instead of dropping ANALYZE information, did you try updating it instead, by running ANALYZE again ? Ah ... > ANALYZE; > INSERT INTO sqlite_stat1 VALUES('BookGenres','BookGenres','3190 2 1'); How do we know your values for sqlite_stat1 are right ? Why aren't you just leaving ANALZE to do its job ? Also, you are missing out on part of what ANALYZE does. As well as looking at your schema, ANALYZE also considers the 'chunkiness' of the data in each indexed column. Run it with data in the table, with the data as convincing as possible in terms of number of rows and the values in each column. In your create.txt I would insert data in your tables, then put ANALYZE just before COMMIT. Curious to know if this improves matters for you. I'm not certain. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users