When would that specific LEFT JOIN ever do anything except return NULLs for the 
right table?  It only accepts rows from work where fpath is null, and only 
joins those rows where fpath = home.fpath.  Since fpath must be null, 
home.fpath should never be equal.

-----Original Message-----
From: sqlite-users-bounces at mailinglists.sqlite.org 
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Reinhard Max
Sent: Monday, July 27, 2015 11:40 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 Mon, 27 Jul 2015 at 17:34, Marc L. Allen wrote:

> Sorry.. confused.... does sqlite allow comparison between NULLs?

No.

> 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.

It is a LEFT (OUTER) join, which NULLs the columns of the right thable in the 
result set for rows in the left table that don't have a match.

cu
        Reinhard
_______________________________________________
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.

Reply via email to