<?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; SELECT 1 vs SELECT * &#8211; An Interesting Observation</title>
	<atom:link href="http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/</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: siva</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-56756</link>
		<dc:creator>siva</dc:creator>
		<pubDate>Fri, 16 Oct 2009 13:44:46 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-56756</guid>
		<description>How do we get back the data that we have deleted from a table?</description>
		<content:encoded><![CDATA[<p>How do we get back the data that we have deleted from a table?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Short</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-53968</link>
		<dc:creator>Jason Short</dc:creator>
		<pubDate>Wed, 22 Jul 2009 18:19:45 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-53968</guid>
		<description>I would not call it a bug if they were not the same under the hood.  The optimizer can only guess so much.  It really depends on how the statements are written.  The ones above are pretty simple and should optimize well, but not all are that easily second guessed as to their intent.</description>
		<content:encoded><![CDATA[<p>I would not call it a bug if they were not the same under the hood.  The optimizer can only guess so much.  It really depends on how the statements are written.  The ones above are pretty simple and should optimize well, but not all are that easily second guessed as to their intent.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evan Carroll</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-53884</link>
		<dc:creator>Evan Carroll</dc:creator>
		<pubDate>Mon, 20 Jul 2009 15:23:46 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-53884</guid>
		<description>I would call it a fairly major bug in the query engine if SELECT 1, and SELECT * were not optimized to do the same thing when the context is within the EXIST() statement. Certainly, there is no practical reason why you would visit any extra meta data at all if exists is just going to return a SQL bool..</description>
		<content:encoded><![CDATA[<p>I would call it a fairly major bug in the query engine if SELECT 1, and SELECT * were not optimized to do the same thing when the context is within the EXIST() statement. Certainly, there is no practical reason why you would visit any extra meta data at all if exists is just going to return a SQL bool..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sangam Uprety</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-53865</link>
		<dc:creator>Sangam Uprety</dc:creator>
		<pubDate>Mon, 20 Jul 2009 09:43:21 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-53865</guid>
		<description>Simple issue and much discussions. And good one! Since in much cases we have to execute the EXISTS, using faster one [may be only fractions of second faster] matters. My preference is using SELECT 1, however. Thanks.</description>
		<content:encoded><![CDATA[<p>Simple issue and much discussions. And good one! Since in much cases we have to execute the EXISTS, using faster one [may be only fractions of second faster] matters. My preference is using SELECT 1, however. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Jorgensen</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-53844</link>
		<dc:creator>Greg Jorgensen</dc:creator>
		<pubDate>Sun, 19 Jul 2009 20:36:10 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-53844</guid>
		<description>Lutz:

EXISTS and NOT EXISTS do the same work: the db engine only has to find a single row that matches the WHERE clause in the subquery to satisfy the test. The syntax gives it aways: NOT EXISTS is the logical NOT of the EXISTS test.

Depending on the subquery WHERE condition the existence of at least one matching row may be answered by scanning an index, or it may require a table scan. In either case as soon as a single matching row is found the result of EXISTS is known. The result of NOT EXISTS is simply the logical inverse of the result of EXISTS.

In your example the subquery inside the EXISTS() doesn&#039;t &quot;return approx. 1 million rows.&quot; It doesn&#039;t return any rows -- it returns a TRUE or FALSE. The db engine can give the result when it encounters the first row matching the WHERE clause. There is no result set to discard for the subquery.

If you are seeing different results using SELECT 1 vs. SELECT * it&#039;s probably due to SELECT * having done all the work and cached the indexes so SELECT 1 has less work to do.</description>
		<content:encoded><![CDATA[<p>Lutz:</p>
<p>EXISTS and NOT EXISTS do the same work: the db engine only has to find a single row that matches the WHERE clause in the subquery to satisfy the test. The syntax gives it aways: NOT EXISTS is the logical NOT of the EXISTS test.</p>
<p>Depending on the subquery WHERE condition the existence of at least one matching row may be answered by scanning an index, or it may require a table scan. In either case as soon as a single matching row is found the result of EXISTS is known. The result of NOT EXISTS is simply the logical inverse of the result of EXISTS.</p>
<p>In your example the subquery inside the EXISTS() doesn&#8217;t &#8220;return approx. 1 million rows.&#8221; It doesn&#8217;t return any rows &#8212; it returns a TRUE or FALSE. The db engine can give the result when it encounters the first row matching the WHERE clause. There is no result set to discard for the subquery.</p>
<p>If you are seeing different results using SELECT 1 vs. SELECT * it&#8217;s probably due to SELECT * having done all the work and cached the indexes so SELECT 1 has less work to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Jorgensen</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-53843</link>
		<dc:creator>Greg Jorgensen</dc:creator>
		<pubDate>Sun, 19 Jul 2009 20:26:21 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-53843</guid>
		<description>This shouldn&#039;t be such a mysterious of contentious subject. SELECT * in an EXISTS condition is a SQL idiom. In this context * means &quot;I don&#039;t care about the columns,&quot; not &quot;fetch all columns.&quot; It may or may not be optimized by the compiler depending on the dialect of SQL. Apparently T-SQL is smart in this regard but other RDBMSs may special-case SELECT * in subqueries.

The Microsoft SQL Server documentation says this:

&quot;The select list of a subquery introduced with EXISTS, by convention, has an asterisk (*) instead of a single column name. The rules for a subquery introduced with EXISTS are the same as those for a standard select list, because a subquery introduced with EXISTS creates an existence test and returns TRUE or FALSE, instead of data.&quot; (T-SQL reference, Subquery Rules).

Anyone who knows SQL should recognize the idiom EXISTS(SELECT * ...). The alternative EXISTS(SELECT 1 ...) is obvious but not really idiomatic. Anything else is just showing off and making the SQL harder for the next person to understand.</description>
		<content:encoded><![CDATA[<p>This shouldn&#8217;t be such a mysterious of contentious subject. SELECT * in an EXISTS condition is a SQL idiom. In this context * means &#8220;I don&#8217;t care about the columns,&#8221; not &#8220;fetch all columns.&#8221; It may or may not be optimized by the compiler depending on the dialect of SQL. Apparently T-SQL is smart in this regard but other RDBMSs may special-case SELECT * in subqueries.</p>
<p>The Microsoft SQL Server documentation says this:</p>
<p>&#8220;The select list of a subquery introduced with EXISTS, by convention, has an asterisk (*) instead of a single column name. The rules for a subquery introduced with EXISTS are the same as those for a standard select list, because a subquery introduced with EXISTS creates an existence test and returns TRUE or FALSE, instead of data.&#8221; (T-SQL reference, Subquery Rules).</p>
<p>Anyone who knows SQL should recognize the idiom EXISTS(SELECT * &#8230;). The alternative EXISTS(SELECT 1 &#8230;) is obvious but not really idiomatic. Anything else is just showing off and making the SQL harder for the next person to understand.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER - Guidelines and Coding Standards Part - 1 Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-47500</link>
		<dc:creator>SQL SERVER - Guidelines and Coding Standards Part - 1 Journey to SQL Authority with Pinal Dave</dc:creator>
		<pubDate>Thu, 26 Feb 2009 12:13:52 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-47500</guid>
		<description>[...] Indent code for better readability. (Example) [...]</description>
		<content:encoded><![CDATA[<p>[...] Indent code for better readability. (Example) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Palanisamy</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-46444</link>
		<dc:creator>Palanisamy</dc:creator>
		<pubDate>Sun, 08 Feb 2009 06:57:29 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-46444</guid>
		<description>Hi Pinal,
            How can we see the &quot;excution Plan&quot;????

Regards,
Palanisamy</description>
		<content:encoded><![CDATA[<p>Hi Pinal,<br />
            How can we see the &#8220;excution Plan&#8221;????</p>
<p>Regards,<br />
Palanisamy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rohit</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-46427</link>
		<dc:creator>rohit</dc:creator>
		<pubDate>Sat, 07 Feb 2009 13:37:40 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-46427</guid>
		<description>how do we get back the data that we ve deleted from a table??</description>
		<content:encoded><![CDATA[<p>how do we get back the data that we ve deleted from a table??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rao K</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-44561</link>
		<dc:creator>Rao K</dc:creator>
		<pubDate>Fri, 05 Dec 2008 17:39:42 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-44561</guid>
		<description>What is the equallent in SQL Server for 

select * from table1 a
where (a.x, a.y) in (
select b.x, min(b.y)
from table1 b
group by b.x
)</description>
		<content:encoded><![CDATA[<p>What is the equallent in SQL Server for </p>
<p>select * from table1 a<br />
where (a.x, a.y) in (<br />
select b.x, min(b.y)<br />
from table1 b<br />
group by b.x<br />
)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lutz Mueller</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-44337</link>
		<dc:creator>Lutz Mueller</dc:creator>
		<pubDate>Fri, 21 Nov 2008 15:24:48 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-44337</guid>
		<description>Hi Pinal,

I&#039;m wondering what test conditions you used...

The other day I had a performance issue with a proceudre that included a statement like

IF NOT EXISTS (SELECT * FROM view WHERE condition)

The view itself based on two tables withe several 10-thousand rows in one and several million in the other (as to my best knowledge properly joined and indexed using information from STATISTICS XML). The SELECT statement above would return approx. 1 million rows.

When I changed it to SELECT 1, performance increased significantly.

My explanation (at least to myself) goes a little more in direction of boolean logic:

The NOT EXISTS statement becomes FALSE performing the following tasks:
SELECT * -&gt; grab all the data and if there are any drop them and return FALSE
SELECT 1 -&gt; try to grab the first row and if you find one single row return FALSE, no matter on how many rows fulfill the WHERE clause

As far as I figured the TRUE statement takes the same time for both, * amd 1, since the resultset is NULL in both cases.

Would you agree with my comment and, if not, retest your code with large tables?

Regards

Lutz</description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I&#8217;m wondering what test conditions you used&#8230;</p>
<p>The other day I had a performance issue with a proceudre that included a statement like</p>
<p>IF NOT EXISTS (SELECT * FROM view WHERE condition)</p>
<p>The view itself based on two tables withe several 10-thousand rows in one and several million in the other (as to my best knowledge properly joined and indexed using information from STATISTICS XML). The SELECT statement above would return approx. 1 million rows.</p>
<p>When I changed it to SELECT 1, performance increased significantly.</p>
<p>My explanation (at least to myself) goes a little more in direction of boolean logic:</p>
<p>The NOT EXISTS statement becomes FALSE performing the following tasks:<br />
SELECT * -&gt; grab all the data and if there are any drop them and return FALSE<br />
SELECT 1 -&gt; try to grab the first row and if you find one single row return FALSE, no matter on how many rows fulfill the WHERE clause</p>
<p>As far as I figured the TRUE statement takes the same time for both, * amd 1, since the resultset is NULL in both cases.</p>
<p>Would you agree with my comment and, if not, retest your code with large tables?</p>
<p>Regards</p>
<p>Lutz</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan Stauffer</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-43000</link>
		<dc:creator>Bryan Stauffer</dc:creator>
		<pubDate>Fri, 19 Sep 2008 17:49:15 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-43000</guid>
		<description>sorry, on that last post, i tried to include a string that inadvertenly looked like html and was stripped out.  just use any user-defined table for the [name] = portion of the query to duplicate my findings.</description>
		<content:encoded><![CDATA[<p>sorry, on that last post, i tried to include a string that inadvertenly looked like html and was stripped out.  just use any user-defined table for the [name] = portion of the query to duplicate my findings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan Stauffer</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-42999</link>
		<dc:creator>Bryan Stauffer</dc:creator>
		<pubDate>Fri, 19 Sep 2008 17:47:31 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-42999</guid>
		<description>SQL 2005

I managed to get a glimpse using the following two queries.  According the estimated query execution plans the &#039;select *&#039; query has an extra step and the estimated row size is larger than &#039;select 1&#039;.  Perhaps this is not proof but I think it is more evidence that &#039;select 1&#039; is the better practice.

select * from tempdb.sys.sysobjects where [name] = &#039;&#039;

select 1 from tempdb.sys.sysobjects where [name] = &#039;&#039;</description>
		<content:encoded><![CDATA[<p>SQL 2005</p>
<p>I managed to get a glimpse using the following two queries.  According the estimated query execution plans the &#8217;select *&#8217; query has an extra step and the estimated row size is larger than &#8217;select 1&#8242;.  Perhaps this is not proof but I think it is more evidence that &#8217;select 1&#8242; is the better practice.</p>
<p>select * from tempdb.sys.sysobjects where [name] = &#8221;</p>
<p>select 1 from tempdb.sys.sysobjects where [name] = &#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: G2</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-40043</link>
		<dc:creator>G2</dc:creator>
		<pubDate>Thu, 10 Jul 2008 20:22:47 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-40043</guid>
		<description>Nice observation</description>
		<content:encoded><![CDATA[<p>Nice observation</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ravi</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-39486</link>
		<dc:creator>Ravi</dc:creator>
		<pubDate>Wed, 25 Jun 2008 06:39:53 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-39486</guid>
		<description>Hi emily here is the answer for your question.

SELECT rnum, employee_id
FROM (
   SELECT rownum rnum, employee_id
   FROM employees
   WHERE ROWNUM &lt; 100)
WHERE rnum BETWEEN 2 AND 12;

this query will retrieve output for 
record 2 until record 12. By use of inline view.

Regards,
Ravi 
Sony India
____________________
Hi,

Just want to ask, is there any select statement whereby it will call you to select the record start from second record then additional 10 records onwards?

For example,

User have to retrieve record 2 until record 12?
If yes, can help?

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi emily here is the answer for your question.</p>
<p>SELECT rnum, employee_id<br />
FROM (<br />
   SELECT rownum rnum, employee_id<br />
   FROM employees<br />
   WHERE ROWNUM &lt; 100)<br />
WHERE rnum BETWEEN 2 AND 12;</p>
<p>this query will retrieve output for<br />
record 2 until record 12. By use of inline view.</p>
<p>Regards,<br />
Ravi<br />
Sony India<br />
____________________<br />
Hi,</p>
<p>Just want to ask, is there any select statement whereby it will call you to select the record start from second record then additional 10 records onwards?</p>
<p>For example,</p>
<p>User have to retrieve record 2 until record 12?<br />
If yes, can help?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: emily</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-36300</link>
		<dc:creator>emily</dc:creator>
		<pubDate>Fri, 02 May 2008 07:57:50 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-36300</guid>
		<description>Hi, 

Just want to ask, is there any select statement whereby it will call you to select the record start from second record then additional 10 records onwards?

For example,

User have to retrieve record 2 until record 12?
If yes, can help?

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>Just want to ask, is there any select statement whereby it will call you to select the record start from second record then additional 10 records onwards?</p>
<p>For example,</p>
<p>User have to retrieve record 2 until record 12?<br />
If yes, can help?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-34139</link>
		<dc:creator>pinaldave</dc:creator>
		<pubDate>Wed, 05 Mar 2008 14:30:04 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-34139</guid>
		<description>Simon,

Good comment. I think there is no real conclusion. As I said I always used SELECT 1, however this whole exercise is for fun and what everybody think about this matter.

I like your way of thinking however neither theory is proven yet. I am also curious what other readers have to suggest.

Regards,
Pinal Dave ( http://www.SQLAuthority.com )</description>
		<content:encoded><![CDATA[<p>Simon,</p>
<p>Good comment. I think there is no real conclusion. As I said I always used SELECT 1, however this whole exercise is for fun and what everybody think about this matter.</p>
<p>I like your way of thinking however neither theory is proven yet. I am also curious what other readers have to suggest.</p>
<p>Regards,<br />
Pinal Dave ( <a href="http://www.SQLAuthority.com" rel="nofollow">http://www.SQLAuthority.com</a> )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: simon worth</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-34138</link>
		<dc:creator>simon worth</dc:creator>
		<pubDate>Wed, 05 Mar 2008 14:24:57 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-34138</guid>
		<description>Honestly I don&#039;t see what the importance of this subject is.  

People have been saying for a long time that SELECT * in an exists condition has unneeded overhead - and there are several blog posts out there to back up that claim.

If you really really want to use SELECT * instead of using SELECT 1 in production code - then go ahead.  

If you haven&#039;t seen performance issues with your code then don&#039;t worry about it.

I understand that you want something tangible to look at and prove or disprove this &quot;theory&quot;, but I don&#039;t have time to put the code together and gather the statistics just to satisfy curiosity.

I&#039;ll leave that up to you to prove or disprove.

It may be a good idea to post a comment on Connor&#039;s site asking if he can prove or disprove this - as he is more intimate with the query processor than I am.</description>
		<content:encoded><![CDATA[<p>Honestly I don&#8217;t see what the importance of this subject is.  </p>
<p>People have been saying for a long time that SELECT * in an exists condition has unneeded overhead &#8211; and there are several blog posts out there to back up that claim.</p>
<p>If you really really want to use SELECT * instead of using SELECT 1 in production code &#8211; then go ahead.  </p>
<p>If you haven&#8217;t seen performance issues with your code then don&#8217;t worry about it.</p>
<p>I understand that you want something tangible to look at and prove or disprove this &#8220;theory&#8221;, but I don&#8217;t have time to put the code together and gather the statistics just to satisfy curiosity.</p>
<p>I&#8217;ll leave that up to you to prove or disprove.</p>
<p>It may be a good idea to post a comment on Connor&#8217;s site asking if he can prove or disprove this &#8211; as he is more intimate with the query processor than I am.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guy Pravin</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-34137</link>
		<dc:creator>Guy Pravin</dc:creator>
		<pubDate>Wed, 05 Mar 2008 14:15:13 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-34137</guid>
		<description>Simon,

We can not take anybodies word for it. (With due respect to Conor - I know he is the man). Is there any proof for this?

-Guy</description>
		<content:encoded><![CDATA[<p>Simon,</p>
<p>We can not take anybodies word for it. (With due respect to Conor &#8211; I know he is the man). Is there any proof for this?</p>
<p>-Guy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: simon worth</title>
		<link>http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/#comment-34135</link>
		<dc:creator>simon worth</dc:creator>
		<pubDate>Wed, 05 Mar 2008 14:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=519#comment-34135</guid>
		<description>If you want to read more about the meta data collection on objects when the query is executed - read the article that Allan Svelmoe Hansen posted in the first comment.  Conor used to work (I don&#039;t think he still does) for Microsoft on the Query Processor team.  If anyone would know the inside of the query processor it&#039;s him.  In that blog post he states

&quot;The * will be expanded to some potentially big column list and then it will be determined that the semantics of the EXISTS does not require any of those columns, so basically all of them can be removed.

&quot;SELECT 1&quot; will avoid having to examine any unneeded metadata for that table during query compilation.&quot;

Source : http://www.sqlskills.com/blogs/conor/2008/02/07/EXISTSSubqueriesSELECT1VsSELECT.aspx</description>
		<content:encoded><![CDATA[<p>If you want to read more about the meta data collection on objects when the query is executed &#8211; read the article that Allan Svelmoe Hansen posted in the first comment.  Conor used to work (I don&#8217;t think he still does) for Microsoft on the Query Processor team.  If anyone would know the inside of the query processor it&#8217;s him.  In that blog post he states</p>
<p>&#8220;The * will be expanded to some potentially big column list and then it will be determined that the semantics of the EXISTS does not require any of those columns, so basically all of them can be removed.</p>
<p>&#8220;SELECT 1&#8243; will avoid having to examine any unneeded metadata for that table during query compilation.&#8221;</p>
<p>Source : <a href="http://www.sqlskills.com/blogs/conor/2008/02/07/EXISTSSubqueriesSELECT1VsSELECT.aspx" rel="nofollow">http://www.sqlskills.com/blogs/conor/2008/02/07/EXISTSSubqueriesSELECT1VsSELECT.aspx</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
