<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: NOT EXISTS vs NOT IN</title>
	<atom:link href="http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/feed/" rel="self" type="application/rss+xml" />
	<link>http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/</link>
	<description>A discussion on SQL Server</description>
	<lastBuildDate>Tue, 07 Feb 2012 14:50:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Gail</title>
		<link>http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/comment-page-1/#comment-635</link>
		<dc:creator>Gail</dc:creator>
		<pubDate>Wed, 30 Jun 2010 07:06:30 +0000</pubDate>
		<guid isPermaLink="false">http://sqlinthewild.co.za/?p=553#comment-635</guid>
		<description>Interesting, thanks Otto.</description>
		<content:encoded><![CDATA[<p>Interesting, thanks Otto.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Otto Astorga</title>
		<link>http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/comment-page-1/#comment-634</link>
		<dc:creator>Otto Astorga</dc:creator>
		<pubDate>Wed, 30 Jun 2010 00:24:33 +0000</pubDate>
		<guid isPermaLink="false">http://sqlinthewild.co.za/?p=553#comment-634</guid>
		<description>Works the exact same way in Oracle. I was actually testing this issue and the difference between not exists and not in in the particular query I was running is 688 miliseconds with NOT EXISTS, 9 minutes 35 seconds with NOT IN.

That&#039;s is a monumental difference. Column referenced is indexed.</description>
		<content:encoded><![CDATA[<p>Works the exact same way in Oracle. I was actually testing this issue and the difference between not exists and not in in the particular query I was running is 688 miliseconds with NOT EXISTS, 9 minutes 35 seconds with NOT IN.</p>
<p>That&#8217;s is a monumental difference. Column referenced is indexed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: E Mulwa</title>
		<link>http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/comment-page-1/#comment-633</link>
		<dc:creator>E Mulwa</dc:creator>
		<pubDate>Mon, 28 Jun 2010 19:57:38 +0000</pubDate>
		<guid isPermaLink="false">http://sqlinthewild.co.za/?p=553#comment-633</guid>
		<description>One question: Is this a standard ANSI SQL behaviour or is it specific for SQL Server? For example, will this behaviour be the same in MySQL, Oracle, etc?</description>
		<content:encoded><![CDATA[<p>One question: Is this a standard ANSI SQL behaviour or is it specific for SQL Server? For example, will this behaviour be the same in MySQL, Oracle, etc?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: praneeth</title>
		<link>http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/comment-page-1/#comment-632</link>
		<dc:creator>praneeth</dc:creator>
		<pubDate>Mon, 10 May 2010 18:59:21 +0000</pubDate>
		<guid isPermaLink="false">http://sqlinthewild.co.za/?p=553#comment-632</guid>
		<description>nice article, thanks gail</description>
		<content:encoded><![CDATA[<p>nice article, thanks gail</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL Server Central</title>
		<link>http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/comment-page-1/#comment-631</link>
		<dc:creator>SQL Server Central</dc:creator>
		<pubDate>Sun, 28 Mar 2010 16:49:10 +0000</pubDate>
		<guid isPermaLink="false">http://sqlinthewild.co.za/?p=553#comment-631</guid>
		<description>[...] Not in vs Not Exists [...]</description>
		<content:encoded><![CDATA[<p>[...] Not in vs Not Exists [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muthukkumaran</title>
		<link>http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/comment-page-1/#comment-630</link>
		<dc:creator>Muthukkumaran</dc:creator>
		<pubDate>Tue, 23 Mar 2010 12:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://sqlinthewild.co.za/?p=553#comment-630</guid>
		<description>Gail,Thanks for the great post.</description>
		<content:encoded><![CDATA[<p>Gail,Thanks for the great post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/comment-page-1/#comment-629</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Sun, 14 Mar 2010 22:00:10 +0000</pubDate>
		<guid isPermaLink="false">http://sqlinthewild.co.za/?p=553#comment-629</guid>
		<description>Thank you for this.  I hadn&#039;t come across it in a lot of the things I&#039;d read, and found it very useful.</description>
		<content:encoded><![CDATA[<p>Thank you for this.  I hadn&#8217;t come across it in a lot of the things I&#8217;d read, and found it very useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fabri</title>
		<link>http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/comment-page-1/#comment-628</link>
		<dc:creator>Fabri</dc:creator>
		<pubDate>Tue, 23 Feb 2010 09:45:52 +0000</pubDate>
		<guid isPermaLink="false">http://sqlinthewild.co.za/?p=553#comment-628</guid>
		<description>Excellent post!</description>
		<content:encoded><![CDATA[<p>Excellent post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gail</title>
		<link>http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/comment-page-1/#comment-627</link>
		<dc:creator>Gail</dc:creator>
		<pubDate>Fri, 19 Feb 2010 08:11:27 +0000</pubDate>
		<guid isPermaLink="false">http://sqlinthewild.co.za/?p=553#comment-627</guid>
		<description>Yes, it is possible. The classic case is when the correlation condition is an inequality. However that&#039;s not something likely in an IN/EXISTS condition, more likely when working with subqueries in the SELECT clause</description>
		<content:encoded><![CDATA[<p>Yes, it is possible. The classic case is when the correlation condition is an inequality. However that&#8217;s not something likely in an IN/EXISTS condition, more likely when working with subqueries in the SELECT clause</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raj</title>
		<link>http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/comment-page-1/#comment-626</link>
		<dc:creator>Raj</dc:creator>
		<pubDate>Fri, 19 Feb 2010 03:13:26 +0000</pubDate>
		<guid isPermaLink="false">http://sqlinthewild.co.za/?p=553#comment-626</guid>
		<description>Hi Gail,
Just some observation.
Is there any situation where a non correlated sub query outperforms  corelated one?.
I have noticed it either to have identical plans when it comes to &#039;in and exists&#039;( as written by you already ) or correlated outperforming as in the case of Not exists vs not in  when Nulls are involved.
To play it safe, in general, I suggest people to use correlated ones as even a structure change later by someone else doesn&#039;t cause big a performance down. Not many will suspect a alter column to NULL as the cause of issue. Would like to know your take on the same.

Regards,
Raj</description>
		<content:encoded><![CDATA[<p>Hi Gail,<br />
Just some observation.<br />
Is there any situation where a non correlated sub query outperforms  corelated one?.<br />
I have noticed it either to have identical plans when it comes to &#8216;in and exists&#8217;( as written by you already ) or correlated outperforming as in the case of Not exists vs not in  when Nulls are involved.<br />
To play it safe, in general, I suggest people to use correlated ones as even a structure change later by someone else doesn&#8217;t cause big a performance down. Not many will suspect a alter column to NULL as the cause of issue. Would like to know your take on the same.</p>
<p>Regards,<br />
Raj</p>
]]></content:encoded>
	</item>
</channel>
</rss>

