On Thu, Aug 21, 2014 at 7:35 AM, Mario M. Westphal <m...@mwlabs.de> wrote:

> Hi, Richard
>
> I have prepared a sample database, sample statements and some additional
> details and sent it to your email address.
>

Thanks for sending the sample data.  Here is what I found:

Your ANALYZE information (stored in the sqlite_stat1 and sqlite_stat3
tables) is out-of-date and no longer reflects the shape of the actual data
in the database.  You can fix this in either of two ways:

(1) Rerun ANALYZE

(2) Remove the analysis using:  "DROP TABLE sqlite_stat1; DROP TABLE
sqlite_stat3;"

If you do either of the above, the second query is fast again.  I don't
know about the first query because it depends on the "_temptable" table
which is not a part of the package you sent, so I am unable to run it.


-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to