>> On Mon, Oct 18, 2010 at 9:18 AM, Peter <pe...@somborneshetlands.co.uk>wrote: >> > I have a query which takes 17 minutes to run with 3.7.3 against 800ms >> > with 3.7.2 >> > >> > > Thank you for the report. > > Can you please send your complete schema. The query is useful in > combination with the schema but is pretty much useless without it. > > Have you tried running ANALYZE? Does it help? Can you also send (in > addition to the schema) the content of the sqlite_stat1 table after you have > run ANALYZE. > > Your easiest work-around for the time being is to do > > PRAGMA automatic_index=OFF; >
Sorry, temporary softening of the brain. The relevant tables (and the query) are at http://www.somborneshetlands.co.uk/things/slow_query.zip. Turning automatic_index off doesn't restore the original performance (I got bored waiting after a couple of minutes though). Ditto for ANALYZE (the database in the .zip has had ANALYZE run on it). I have another query in the same style (nested selects) that also runs like a dog on 3.7.3. I decided the best work-around was to extract the third level select (the one that makes table y) and run it separately to create a temporary table. If I substitute that table instead of the select then the combination of the two runs about as fast as the original - fast enough anyway. Pete -- Peter Hardman Breeder of Shetland sheep and cattle _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users