Jens Alfke wrote...

On Aug 16, 2017, at 8:36 PM, jose isaias cabrera <[email protected]> wrote:

The following query is taking a bit too long for my taste. I did a quick query with explain and I got this…

The output of EXPLAIN QUERY PLAN is a lot easier to understand; have you tried that? Most importantly it shows which indexes / tables are being searched (fast) or scanned (slow),
and if a covering index is used.

sqlite> ATTACH 'L:\Data\OpenJobsTool\Selva.Shared.DB.UK.AllOpenProjs.db' AS client;
sqlite>
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...



_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to