They are not the same. Just as 5 - 3 is not the same as 1 + 1, even though both come up with the same result, 2. by happenstance.
Your "where" condition is effectively converted an OUTER JOIN into an INNER JOIN through artifice (and quite likely mistake). If you *want* an inner join, use an inner join. If you want an outer join, use an outer join. Just because subtraction of two different numbers may have the same result as addition of two other numbers, does not meant that addition and subtraction are the same thing. --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-----Original Message----- >From: sqlite-users [mailto:sqlite-users- >[email protected]] On Behalf Of Dinu >Sent: Thursday, 4 January, 2018 16:01 >To: [email protected] >Subject: Re: [sqlite] LEFT JOIN + WHERE / OR optimisation > >Algebrically, having a non-null imperative lookup condition in the >WHERE >clause means you have a stronger predicate on the same subject (ALL >MUST fit >vs. ANY that fit). > > > >-- >Sent from: http://sqlite.1065341.n5.nabble.com/ >_______________________________________________ >sqlite-users mailing list >[email protected] >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

