On 4/28/17, Igor Tandetnik <[email protected]> wrote: > On 4/28/2017 5:30 PM, Jens Alfke wrote: >> Another query using the wrong plan, even though I’ve added a unary “+” to >> prevent use of indexes on ‘current’: > > It seems the index is used to implement "ORDER BY revs.doc_id" part. Try > "ORDER BY +revs.doc_id"
In an ideal world, none of this kind of query hinting would be required. Have you tried running "PRAGMA optimize" once after running the query above, then rerunning the query to see if the query plan changes? Can you run ANALYZE and send us a dump of the sqlite_stat1 table? -- D. Richard Hipp [email protected] _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

