Thanks Clemens,

I triple-checked it and it is indeed generating different execution plans,
with the queries being absolutely equivalent. I will try to produce a
minimal test case (right now the query where this occurs is a 100 lines long
monster). 

However, I am a bit confused by the examples you provided:
The 3rd query is the equivalent of the first 2 only if the lookup table has
an unique index on x (which it does). However, this would make a very
restricted case of why you would use EXISTS(). 

In my case, this is completely opposite: x is definitely not unique in the
lookup table, that's precisely why I'm using EXISTS or IN, to avoid the row
multiplication generated by a JOIN.



--
Sent from: http://sqlite.1065341.n5.nabble.com/
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to