<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Better Performance &#8211; LEFT JOIN or NOT IN?</title>
	<atom:link href="http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/</link>
	<description>Notes of a SQL Server MVP and Database Administrator</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:54:09 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Barbara70</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-56580</link>
		<dc:creator>Barbara70</dc:creator>
		<pubDate>Sat, 10 Oct 2009 15:59:46 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-56580</guid>
		<description>Thanks a lotI consider this site a very good one for me to face the interview questions ahead of me. ,</description>
		<content:encoded><![CDATA[<p>Thanks a lotI consider this site a very good one for me to face the interview questions ahead of me. ,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pradip</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-56470</link>
		<dc:creator>Pradip</dc:creator>
		<pubDate>Tue, 06 Oct 2009 10:08:42 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-56470</guid>
		<description>When you execute both query at one time it will show relative cost for each query.</description>
		<content:encoded><![CDATA[<p>When you execute both query at one time it will show relative cost for each query.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pradip</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-56466</link>
		<dc:creator>Pradip</dc:creator>
		<pubDate>Tue, 06 Oct 2009 09:00:42 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-56466</guid>
		<description>I am not aware of how you measured resource percentage given &quot;20% resources of execution plan and LEFT JOIN takes 80% resources of execution plan&quot;. I need little more explanation.

Regards,
Pradip</description>
		<content:encoded><![CDATA[<p>I am not aware of how you measured resource percentage given &#8220;20% resources of execution plan and LEFT JOIN takes 80% resources of execution plan&#8221;. I need little more explanation.</p>
<p>Regards,<br />
Pradip</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam Rudolph</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-55552</link>
		<dc:creator>Sam Rudolph</dc:creator>
		<pubDate>Thu, 03 Sep 2009 10:30:57 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-55552</guid>
		<description>hey Dave great thread, can you please tell me how did analyse the preform of the query,whats the meaning of 80% of the batch,and whats the tool you are using for the analysis??...
hope for the quick reply.
bbye</description>
		<content:encoded><![CDATA[<p>hey Dave great thread, can you please tell me how did analyse the preform of the query,whats the meaning of 80% of the batch,and whats the tool you are using for the analysis??&#8230;<br />
hope for the quick reply.<br />
bbye</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-53356</link>
		<dc:creator>James</dc:creator>
		<pubDate>Tue, 30 Jun 2009 14:05:04 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-53356</guid>
		<description>You are a star, three days of banging my head against the monitor have come to an end as a result of reading  this post. 

Thanks</description>
		<content:encoded><![CDATA[<p>You are a star, three days of banging my head against the monitor have come to an end as a result of reading  this post. </p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kumar</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-53111</link>
		<dc:creator>kumar</dc:creator>
		<pubDate>Fri, 19 Jun 2009 11:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-53111</guid>
		<description>Thanks a lot!!!</description>
		<content:encoded><![CDATA[<p>Thanks a lot!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-52981</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Fri, 12 Jun 2009 17:07:16 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-52981</guid>
		<description>The difference is obvious in the query plans, the Join query is not using the index.  You could alter the indices or the query to take advantage of the indices.  Also, when you look at the statistics output you can see that the Join query is doing much better than the Not In query based on reads and scans, which in a high volume environment will be a much better indication of performance anyway.  My opinion, the percentages shown on query plans are useless, use query plans only to figure out what indices you&#039;re not taking advantage of (i.e. look for table and index scans).</description>
		<content:encoded><![CDATA[<p>The difference is obvious in the query plans, the Join query is not using the index.  You could alter the indices or the query to take advantage of the indices.  Also, when you look at the statistics output you can see that the Join query is doing much better than the Not In query based on reads and scans, which in a high volume environment will be a much better indication of performance anyway.  My opinion, the percentages shown on query plans are useless, use query plans only to figure out what indices you&#8217;re not taking advantage of (i.e. look for table and index scans).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brvcoordinator</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-52912</link>
		<dc:creator>brvcoordinator</dc:creator>
		<pubDate>Wed, 10 Jun 2009 16:04:27 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-52912</guid>
		<description>Very Helpful!</description>
		<content:encoded><![CDATA[<p>Very Helpful!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tiago Salgado</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-52356</link>
		<dc:creator>Tiago Salgado</dc:creator>
		<pubDate>Mon, 25 May 2009 08:43:05 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-52356</guid>
		<description>Sanjay, you can use ROWCOUNT.

SET ROWCOUNT 10
SELECT * FROM table
SET ROWCOUNT 0</description>
		<content:encoded><![CDATA[<p>Sanjay, you can use ROWCOUNT.</p>
<p>SET ROWCOUNT 10<br />
SELECT * FROM table<br />
SET ROWCOUNT 0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sanjay</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-49262</link>
		<dc:creator>Sanjay</dc:creator>
		<pubDate>Tue, 17 Mar 2009 06:36:39 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-49262</guid>
		<description>hi Pinal,

I want to retrieve only limited data from database like limit is keyword in mysql which retrieve limited data according to our arguments. Like I want to load only 10 records from the database at first display in page. but I don’t want to using top. Because its create problem of paging. So please give me alternate solution for that’d have use row index but in that row index I have to write inner query and my data base I s to heavy.</description>
		<content:encoded><![CDATA[<p>hi Pinal,</p>
<p>I want to retrieve only limited data from database like limit is keyword in mysql which retrieve limited data according to our arguments. Like I want to load only 10 records from the database at first display in page. but I don’t want to using top. Because its create problem of paging. So please give me alternate solution for that’d have use row index but in that row index I have to write inner query and my data base I s to heavy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AK SABIN</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-47572</link>
		<dc:creator>AK SABIN</dc:creator>
		<pubDate>Fri, 27 Feb 2009 10:42:13 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-47572</guid>
		<description>Brilliant posts !</description>
		<content:encoded><![CDATA[<p>Brilliant posts !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ali</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-44509</link>
		<dc:creator>ali</dc:creator>
		<pubDate>Wed, 03 Dec 2008 09:33:59 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-44509</guid>
		<description>--List names of authors who have contributed in
--any book title
SELECT DISTINCT authors.au_id,au_fname
FROM authors,titleauthor 
WHERE authors.au_id!=titleauthor.au_id

SELECT au_id, au_fname FROM authors WHERE authors.au_id NOT IN
(SELECT au_id FROM titleauthor)


why the above query did not work as same as the below query??
the above on shows more records then the following.
why we did not do the same work with JOIN as with NOT IN??</description>
		<content:encoded><![CDATA[<p>&#8211;List names of authors who have contributed in<br />
&#8211;any book title<br />
SELECT DISTINCT authors.au_id,au_fname<br />
FROM authors,titleauthor<br />
WHERE authors.au_id!=titleauthor.au_id</p>
<p>SELECT au_id, au_fname FROM authors WHERE authors.au_id NOT IN<br />
(SELECT au_id FROM titleauthor)</p>
<p>why the above query did not work as same as the below query??<br />
the above on shows more records then the following.<br />
why we did not do the same work with JOIN as with NOT IN??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Naseer Ahmad</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-44406</link>
		<dc:creator>Naseer Ahmad</dc:creator>
		<pubDate>Wed, 26 Nov 2008 12:56:06 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-44406</guid>
		<description>Thanks for such a nice tip... its really help me in MySQL...

Thanks once again

regards, 
Naseer Ahmad</description>
		<content:encoded><![CDATA[<p>Thanks for such a nice tip&#8230; its really help me in MySQL&#8230;</p>
<p>Thanks once again</p>
<p>regards,<br />
Naseer Ahmad</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Zagars</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-44352</link>
		<dc:creator>Bob Zagars</dc:creator>
		<pubDate>Sat, 22 Nov 2008 04:40:22 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-44352</guid>
		<description>Simple...KISS!

Oracle does not have Exists.  Is there an equivalent?

Bob</description>
		<content:encoded><![CDATA[<p>Simple&#8230;KISS!</p>
<p>Oracle does not have Exists.  Is there an equivalent?</p>
<p>Bob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shantha</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-44179</link>
		<dc:creator>Shantha</dc:creator>
		<pubDate>Wed, 12 Nov 2008 12:33:50 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-44179</guid>
		<description>Thanks! Really it is very useful for my query changes</description>
		<content:encoded><![CDATA[<p>Thanks! Really it is very useful for my query changes</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jchen</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-44110</link>
		<dc:creator>jchen</dc:creator>
		<pubDate>Fri, 07 Nov 2008 22:39:29 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-44110</guid>
		<description>I ran this select,
USE ttst
GO
SET SHOWPLAN_ALL ON
GO
select * from customer
where c.record_type = &#039;T&#039;
   and c.customer_class_code = &#039;LOCAL&#039;
   and c.customer_status_code = &#039;ACTIVE&#039;
SET SHOWPLAN_ALL OFF
GO
it gave me a error like below,
Server: Msg 1067, Level 15, State 1, Line 5
The SET SHOWPLAN statements must be the only statements in the batch.

(1 row(s) affected)
What is the correct way to use the set showplan_all on?

Jchen</description>
		<content:encoded><![CDATA[<p>I ran this select,<br />
USE ttst<br />
GO<br />
SET SHOWPLAN_ALL ON<br />
GO<br />
select * from customer<br />
where c.record_type = &#8216;T&#8217;<br />
   and c.customer_class_code = &#8216;LOCAL&#8217;<br />
   and c.customer_status_code = &#8216;ACTIVE&#8217;<br />
SET SHOWPLAN_ALL OFF<br />
GO<br />
it gave me a error like below,<br />
Server: Msg 1067, Level 15, State 1, Line 5<br />
The SET SHOWPLAN statements must be the only statements in the batch.</p>
<p>(1 row(s) affected)<br />
What is the correct way to use the set showplan_all on?</p>
<p>Jchen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philihp</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-42839</link>
		<dc:creator>Philihp</dc:creator>
		<pubDate>Tue, 16 Sep 2008 03:53:50 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-42839</guid>
		<description>Usually it is better to avoid correlated subselects. Looking only at only resources used is a pretty worthless method of evaluating optimization methods. The goal of optimization is to reduce run-time while still giving the correct answer.</description>
		<content:encoded><![CDATA[<p>Usually it is better to avoid correlated subselects. Looking only at only resources used is a pretty worthless method of evaluating optimization methods. The goal of optimization is to reduce run-time while still giving the correct answer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerry Hung</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-38118</link>
		<dc:creator>Jerry Hung</dc:creator>
		<pubDate>Thu, 15 May 2008 14:19:04 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-38118</guid>
		<description>NOT EXISTS/LEFT JOIN &gt; SUBQUERY/NOT IN

That&#039;s how I see it &quot;most of the time&quot;</description>
		<content:encoded><![CDATA[<p>NOT EXISTS/LEFT JOIN &gt; SUBQUERY/NOT IN</p>
<p>That&#8217;s how I see it &#8220;most of the time&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronak</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-35806</link>
		<dc:creator>Ronak</dc:creator>
		<pubDate>Mon, 28 Apr 2008 06:02:18 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-35806</guid>
		<description>Dude,

You know it well how query optimiser works. Do you work for MS cause noone can explain things like you.</description>
		<content:encoded><![CDATA[<p>Dude,</p>
<p>You know it well how query optimiser works. Do you work for MS cause noone can explain things like you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL DBA</title>
		<link>http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/#comment-35805</link>
		<dc:creator>SQL DBA</dc:creator>
		<pubDate>Sun, 27 Apr 2008 06:00:45 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=578#comment-35805</guid>
		<description>Very very good.
Your explanations are great! Simply Great!</description>
		<content:encoded><![CDATA[<p>Very very good.<br />
Your explanations are great! Simply Great!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
