On 4/28/17, Igor Tandetnik <i...@tandetnik.org> 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
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to