Sorry.. confused.... does sqlite allow comparison between NULLs? I mean...
LEFT JOIN work ON work.fpath = home.fpath WHERE work.fpath IS NULL Should never match anything... it checks to see if work.fpath IS NULL and if the same work.fpath is equal to something. I get the weird feeling that I'm missing something stupid, so massive apologies in advance. Maybe I came in late and this is some clever way of using an index? Marc -----Original Message----- From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Simon Slavin Sent: Monday, July 27, 2015 10:47 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Query takes 8 seconds on one machine but I abort after 40+ minutes on other machines On 27 Jul 2015, at 3:04pm, Igor Tandetnik <igor at tandetnik.org> wrote: > That's a common technique with LEFT JOIN Thanks, Igor. On 27 Jul 2015, at 1:44pm, rotaiv <rotaiv at gmail.com> wrote: > SELECT home.fpath > FROM home > LEFT JOIN work ON work.fpath = home.fpath WHERE work.fpath IS NULL AND > home.ftype = 'f?; Can you verify that you have an index on work.fpath ? 16 seconds is still a little slower than it should be. Simon. _______________________________________________ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users This email and any attachments are only for use by the intended recipient(s) and may contain legally privileged, confidential, proprietary or otherwise private information. Any unauthorized use, reproduction, dissemination, distribution or other disclosure of the contents of this e-mail or its attachments is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original.