> On Apr 28, 2017, at 2:00 PM, Simon Slavin <slav...@bigfraud.org> wrote:
> 
> What indexes do you have on these two tables ?  I can’t recommend one without 
> knowing which columns belong to which tables.

I showed them at the end of my first message.

> First query rewritten for clarity:
> […] Should be more like
> 
> SELECT revs.doc_id, sequence, docid, revid, json, deleted FROM revs
>       JOIN docs ON docs.doc_id = revs.doc_id
>       WHERE sequence>? AND current!=0 AND deleted=0
>       ORDER BY revs.doc_id, deleted, revid DESC

The only difference is the explicit JOIN statement. I was under the impression 
that using this, vs. the way I wrote it, is a matter of taste that doesn’t 
affect the execution of the query. (I just tried changing some queries to use 
JOIN syntax and it didn’t affect their query plans.)

—Jens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to