
IMHO, with IN, you gotta provide a list of things to look INto, most often, this list tends to be manageable. With NOT EXISTS, well, we do not know beforehand what the e.g. subquery being used will return. I think this lack of prior knowledge messes up with performance. Assuming ur using a subquery with the NOT EXISTS, try EXPLAIN (or the equivalent in whichever database you use) it to see if its performing ok. On Fri, May 27, 2011 at 6:11 AM, James Maina <jameskmaina@hotmail.com>wrote:
Whats the difference between IN and NOT EXISTS? A difference of 30 sec in performance!
Have a great day!
James K. Maina Cell: +254-0721-490933 Email: jameskmaina@hotmail.com
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke