> On 17 Aug 2017, at 1:40pm, jose isaias cabrera <jic...@barrioinvi.net> wrote:
> 
> sqlite> explain query plan
>  ...> SELECT ls.id FROM LSOpenProjects ls JOIN client.LSOpenProjects cl ON
>  ...> (
>  ...>   cl.login != 'lsuser' AND
>  ...>   cl.id = ls.id AND
>  ...>   cl.XtraB != ls.XtraB
>  ...> ) LIMIT 100;
> 0|0|1|SCAN TABLE LSOpenProjects AS cl USING COVERING INDEX Proj_id_login_XtraB
> 0|1|0|SEARCH TABLE LSOpenProjects AS ls USING INTEGER PRIMARY KEY (rowid=?)
> sqlite>
> 
> from what this means, I guess what I need to do is to re-arrange the table...

Nope.  Just create an appropriate index.  Try doing this

CREATE INDEX test1 ON client.LSOpenProjects(login,XtraB);
ANALYZE

Then try the EXPLAIN QUERY PLAN again.  Though your query is unusual and it’s 
possible that SQLite has already found a good way to execute your command.

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

Reply via email to