<?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; Difference Between Union vs. Union All &#8211; Optimal Performance Comparison</title>
	<atom:link href="http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Mon, 13 Feb 2012 15:11:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Bipin</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-223592</link>
		<dc:creator><![CDATA[Bipin]]></dc:creator>
		<pubDate>Thu, 22 Dec 2011 10:29:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-223592</guid>
		<description><![CDATA[You Rock !]]></description>
		<content:encoded><![CDATA[<p>You Rock !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dushyant</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-189550</link>
		<dc:creator><![CDATA[Dushyant]]></dc:creator>
		<pubDate>Sun, 06 Nov 2011 17:53:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-189550</guid>
		<description><![CDATA[Good explanation of union and union all..thanks]]></description>
		<content:encoded><![CDATA[<p>Good explanation of union and union all..thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Parminder</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-160604</link>
		<dc:creator><![CDATA[Parminder]]></dc:creator>
		<pubDate>Mon, 22 Aug 2011 12:54:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-160604</guid>
		<description><![CDATA[Excellent Article]]></description>
		<content:encoded><![CDATA[<p>Excellent Article</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jorge</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-150584</link>
		<dc:creator><![CDATA[Jorge]]></dc:creator>
		<pubDate>Mon, 25 Jul 2011 15:02:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-150584</guid>
		<description><![CDATA[Hi,

Excellent article, i have a query that takes 5 min o more, with this change he takes 4 seconds.

thanks.]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Excellent article, i have a query that takes 5 min o more, with this change he takes 4 seconds.</p>
<p>thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-117018</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Mon, 07 Feb 2011 10:33:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-117018</guid>
		<description><![CDATA[Most like the first column but this behaviour is changed from version 2005 and it wont be sorted]]></description>
		<content:encoded><![CDATA[<p>Most like the first column but this behaviour is changed from version 2005 and it wont be sorted</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Megha</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-116893</link>
		<dc:creator><![CDATA[Megha]]></dc:creator>
		<pubDate>Sun, 06 Feb 2011 20:33:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-116893</guid>
		<description><![CDATA[Hi,

Very nice article...clearly differnciated the difference.
But there is one thing that i would like to ask..

As UNION sorts the o/p records on which column it will sort if there are more than one column which do not contain the primary key column??

Pls reply.Thanks in advance.]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Very nice article&#8230;clearly differnciated the difference.<br />
But there is one thing that i would like to ask..</p>
<p>As UNION sorts the o/p records on which column it will sort if there are more than one column which do not contain the primary key column??</p>
<p>Pls reply.Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Junior0300</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-111224</link>
		<dc:creator><![CDATA[Junior0300]]></dc:creator>
		<pubDate>Sun, 16 Jan 2011 16:48:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-111224</guid>
		<description><![CDATA[I think the title of this article could be improved

for e.g.,  instead of using Difference and vs in the same line

&quot;Difference Between Union vs. Union All – Optimal Performance Comparison&quot;

you could use

&quot;Difference Between Union and Union All – Optimal Performance Comparison&quot;

Its a wonderful article though!]]></description>
		<content:encoded><![CDATA[<p>I think the title of this article could be improved</p>
<p>for e.g.,  instead of using Difference and vs in the same line</p>
<p>&#8220;Difference Between Union vs. Union All – Optimal Performance Comparison&#8221;</p>
<p>you could use</p>
<p>&#8220;Difference Between Union and Union All – Optimal Performance Comparison&#8221;</p>
<p>Its a wonderful article though!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: priyank</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-110947</link>
		<dc:creator><![CDATA[priyank]]></dc:creator>
		<pubDate>Fri, 14 Jan 2011 08:31:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-110947</guid>
		<description><![CDATA[Thanks a lot........
Nice article]]></description>
		<content:encoded><![CDATA[<p>Thanks a lot&#8230;&#8230;..<br />
Nice article</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-96244</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Thu, 28 Oct 2010 07:41:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-96244</guid>
		<description><![CDATA[When you use UNION operator you dont need to use distinct in a SELECT statement]]></description>
		<content:encoded><![CDATA[<p>When you use UNION operator you dont need to use distinct in a SELECT statement</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jayadevan</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-96055</link>
		<dc:creator><![CDATA[Jayadevan]]></dc:creator>
		<pubDate>Wed, 27 Oct 2010 05:55:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-96055</guid>
		<description><![CDATA[I have a doubt. To retrieve distinct values from union, I could either do 
1)
SELECT * FROM A
UNION 
SELECT * FROM B

I could also do
SELECT DISTINCT * FROM (
SELECT * FROM A
UNION ALL
SELECT * FROM B
) x

I am trying to tune a query which uses
SELECT DISTINCT * FROM A
UNION
SELECT DISTINCT * FROM B
In this case, the DISTINCTs do not serve any purpose. I am trying to figure out how I should rewrite it. 

Any guidelines on which one is better under which circumstances?
Thanks]]></description>
		<content:encoded><![CDATA[<p>I have a doubt. To retrieve distinct values from union, I could either do<br />
1)<br />
SELECT * FROM A<br />
UNION<br />
SELECT * FROM B</p>
<p>I could also do<br />
SELECT DISTINCT * FROM (<br />
SELECT * FROM A<br />
UNION ALL<br />
SELECT * FROM B<br />
) x</p>
<p>I am trying to tune a query which uses<br />
SELECT DISTINCT * FROM A<br />
UNION<br />
SELECT DISTINCT * FROM B<br />
In this case, the DISTINCTs do not serve any purpose. I am trying to figure out how I should rewrite it. </p>
<p>Any guidelines on which one is better under which circumstances?<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anon</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-95952</link>
		<dc:creator><![CDATA[Anon]]></dc:creator>
		<pubDate>Tue, 26 Oct 2010 16:20:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-95952</guid>
		<description><![CDATA[No, those numbers are percentages, and they have to add up to 100. They are smaller than 50% each because a new operation has entered the flow: distinct sort. This operation now takes 63% of the processing time. 

Keep in mind that these percentages provide no indication of the actual processing time involved, they just indicate the relative amounts of time each operation will take.

But, if we assume that the table scans in UNION, and the table scans in UNION ALL take the same amount of actual time, then we can try to estimate how much more time the UNION operation will take. 
Let&#039;s assume the UNION ALL takes 1000msec. Each table scan takes 500msec since each is 50% of the execution. 
Now if we go over to UNION and assume that a table scan will take 500msec here too, this 500msec actually only corresponds to 18% of the execution. So, 500msec/.18 = 2778msec. 
Thus, the UNION should take approx 2.7 times as long, if the assumption holds true and the execution plan is accurate.]]></description>
		<content:encoded><![CDATA[<p>No, those numbers are percentages, and they have to add up to 100. They are smaller than 50% each because a new operation has entered the flow: distinct sort. This operation now takes 63% of the processing time. </p>
<p>Keep in mind that these percentages provide no indication of the actual processing time involved, they just indicate the relative amounts of time each operation will take.</p>
<p>But, if we assume that the table scans in UNION, and the table scans in UNION ALL take the same amount of actual time, then we can try to estimate how much more time the UNION operation will take.<br />
Let&#8217;s assume the UNION ALL takes 1000msec. Each table scan takes 500msec since each is 50% of the execution.<br />
Now if we go over to UNION and assume that a table scan will take 500msec here too, this 500msec actually only corresponds to 18% of the execution. So, 500msec/.18 = 2778msec.<br />
Thus, the UNION should take approx 2.7 times as long, if the assumption holds true and the execution plan is accurate.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shashank Acharya</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-87981</link>
		<dc:creator><![CDATA[Shashank Acharya]]></dc:creator>
		<pubDate>Thu, 16 Sep 2010 03:42:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-87981</guid>
		<description><![CDATA[Nice Article,
I really got short and sweet description about union &amp; union all with examples.
Also I know new thing about execution plan in Server Studio from this article.So that I cam minimize some of my queries fro faster execution.

Thanks.]]></description>
		<content:encoded><![CDATA[<p>Nice Article,<br />
I really got short and sweet description about union &amp; union all with examples.<br />
Also I know new thing about execution plan in Server Studio from this article.So that I cam minimize some of my queries fro faster execution.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ankireddy ambati</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-82984</link>
		<dc:creator><![CDATA[ankireddy ambati]]></dc:creator>
		<pubDate>Wed, 04 Aug 2010 10:55:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-82984</guid>
		<description><![CDATA[hi..

superb article.....

thank u 4 providing these kind of articles...]]></description>
		<content:encoded><![CDATA[<p>hi..</p>
<p>superb article&#8230;..</p>
<p>thank u 4 providing these kind of articles&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Olu</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-80194</link>
		<dc:creator><![CDATA[Olu]]></dc:creator>
		<pubDate>Wed, 14 Jul 2010 09:32:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-80194</guid>
		<description><![CDATA[Brilliant article - simple, yet clearly explained - I like the demo with the actual execution plan giving details of performance differences between Union and Union All]]></description>
		<content:encoded><![CDATA[<p>Brilliant article &#8211; simple, yet clearly explained &#8211; I like the demo with the actual execution plan giving details of performance differences between Union and Union All</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepesh</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-77275</link>
		<dc:creator><![CDATA[Deepesh]]></dc:creator>
		<pubDate>Tue, 22 Jun 2010 10:47:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-77275</guid>
		<description><![CDATA[Hello Pinal,

Nice article, helped a lot in performance tuning the queries. Just had a question, If a query can we written in three ways :
(1) Having an &quot;OR&quot; operator
(2) Having an &quot;Union ALL&quot; operator
(3) having an &quot;IN&quot; operator

Then which method should be used, keeping performance in mind.

Regards,
Deepesh]]></description>
		<content:encoded><![CDATA[<p>Hello Pinal,</p>
<p>Nice article, helped a lot in performance tuning the queries. Just had a question, If a query can we written in three ways :<br />
(1) Having an &#8220;OR&#8221; operator<br />
(2) Having an &#8220;Union ALL&#8221; operator<br />
(3) having an &#8220;IN&#8221; operator</p>
<p>Then which method should be used, keeping performance in mind.</p>
<p>Regards,<br />
Deepesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SSree</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-67822</link>
		<dc:creator><![CDATA[SSree]]></dc:creator>
		<pubDate>Thu, 29 Apr 2010 15:55:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-67822</guid>
		<description><![CDATA[Hello,
Nice article!
This information was helpful in reducing the time required to insert multiple records in to a table. But seems like it triggered a new issue.It is monitored in our production sytem that SQL server private memory keeps increasing until it fails to reserve virtual memory to run query!We are using SQL server 2005 SP3.
I wonder whether anybody else had this issue?Is there any hotfix/sp which addresses this issue?
Thanks]]></description>
		<content:encoded><![CDATA[<p>Hello,<br />
Nice article!<br />
This information was helpful in reducing the time required to insert multiple records in to a table. But seems like it triggered a new issue.It is monitored in our production sytem that SQL server private memory keeps increasing until it fails to reserve virtual memory to run query!We are using SQL server 2005 SP3.<br />
I wonder whether anybody else had this issue?Is there any hotfix/sp which addresses this issue?<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashish</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-57967</link>
		<dc:creator><![CDATA[Ashish]]></dc:creator>
		<pubDate>Sat, 28 Nov 2009 07:07:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-57967</guid>
		<description><![CDATA[Nice article . Thanks .]]></description>
		<content:encoded><![CDATA[<p>Nice article . Thanks .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manu Parashar</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-54977</link>
		<dc:creator><![CDATA[Manu Parashar]]></dc:creator>
		<pubDate>Tue, 18 Aug 2009 15:31:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-54977</guid>
		<description><![CDATA[Nice article Pinal. Very true PHenry, as soon as I look at DISTINCT I know its worth looking closer at that query !!]]></description>
		<content:encoded><![CDATA[<p>Nice article Pinal. Very true PHenry, as soon as I look at DISTINCT I know its worth looking closer at that query !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rikeshr</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-54948</link>
		<dc:creator><![CDATA[rikeshr]]></dc:creator>
		<pubDate>Tue, 18 Aug 2009 05:40:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-54948</guid>
		<description><![CDATA[@Dasha Salo

the percentages are relative , which means that 2x18% of resource in table scan v/s 63% for distinct sort.

you cannot compare %values themselves for 2 different queries. 

the point to note is distinct sort is using more resources compared to no distinct sort.

In simple words, read 50% as &#039;50 % of overall CPU resources/time&#039; for that execution plan compared to 18%.]]></description>
		<content:encoded><![CDATA[<p>@Dasha Salo</p>
<p>the percentages are relative , which means that 2&#215;18% of resource in table scan v/s 63% for distinct sort.</p>
<p>you cannot compare %values themselves for 2 different queries. </p>
<p>the point to note is distinct sort is using more resources compared to no distinct sort.</p>
<p>In simple words, read 50% as &#8217;50 % of overall CPU resources/time&#8217; for that execution plan compared to 18%.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran Mohammed</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-52818</link>
		<dc:creator><![CDATA[Imran Mohammed]]></dc:creator>
		<pubDate>Sun, 07 Jun 2009 20:54:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-52818</guid>
		<description><![CDATA[@Sajjad Ali, 

For example, 

Create table employees ( eid int, ename varchar(10))

insert into employees values ( 1, &#039;imran&#039;)
insert into employees values ( 2, &#039;Taher&#039;)

We inserted two employees information.


-- Lets create another table that stores salary information

create table Salary ( eid int, salary money)


insert into Salary values ( 1, 1000)
insert into Salary values ( 2, 2000)

-- We inserted two employees salary information.

--Now if I want to get the complete data out of these two tables, I will use below script

select	A.eid
		,A.ename
		,B.salary
from	employees A
		join Salary B on A.eid = B.eid
	
You need to have one common column on which you can join multiple tables. 

~ IM.]]></description>
		<content:encoded><![CDATA[<p>@Sajjad Ali, </p>
<p>For example, </p>
<p>Create table employees ( eid int, ename varchar(10))</p>
<p>insert into employees values ( 1, &#8216;imran&#8217;)<br />
insert into employees values ( 2, &#8216;Taher&#8217;)</p>
<p>We inserted two employees information.</p>
<p>&#8211; Lets create another table that stores salary information</p>
<p>create table Salary ( eid int, salary money)</p>
<p>insert into Salary values ( 1, 1000)<br />
insert into Salary values ( 2, 2000)</p>
<p>&#8211; We inserted two employees salary information.</p>
<p>&#8211;Now if I want to get the complete data out of these two tables, I will use below script</p>
<p>select	A.eid<br />
		,A.ename<br />
		,B.salary<br />
from	employees A<br />
		join Salary B on A.eid = B.eid</p>
<p>You need to have one common column on which you can join multiple tables. </p>
<p>~ IM.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sajjad ali</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-52797</link>
		<dc:creator><![CDATA[sajjad ali]]></dc:creator>
		<pubDate>Sat, 06 Jun 2009 08:00:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-52797</guid>
		<description><![CDATA[Hi
how i can select data from two different tables and both have no relationship between them. how i can use only one select statement and obtain the data from two different tables]]></description>
		<content:encoded><![CDATA[<p>Hi<br />
how i can select data from two different tables and both have no relationship between them. how i can use only one select statement and obtain the data from two different tables</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-52717</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Thu, 04 Jun 2009 02:15:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-52717</guid>
		<description><![CDATA[Good Writing PHenry.]]></description>
		<content:encoded><![CDATA[<p>Good Writing PHenry.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHenry</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-52716</link>
		<dc:creator><![CDATA[PHenry]]></dc:creator>
		<pubDate>Thu, 04 Jun 2009 02:08:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-52716</guid>
		<description><![CDATA[Great article, your use of DISTINCT spured me to write a blog about it.

http://www.pchenry.com/Home/tabid/36/EntryID/166/Default.aspx

I hope you don&#039;t mind but I mentioned this blog, I hope that&#039;s ok with you?  Keep up the great work with your blog entries!]]></description>
		<content:encoded><![CDATA[<p>Great article, your use of DISTINCT spured me to write a blog about it.</p>
<p><a href="http://www.pchenry.com/Home/tabid/36/EntryID/166/Default.aspx" rel="nofollow">http://www.pchenry.com/Home/tabid/36/EntryID/166/Default.aspx</a></p>
<p>I hope you don&#8217;t mind but I mentioned this blog, I hope that&#8217;s ok with you?  Keep up the great work with your blog entries!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dasha Salo</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-52417</link>
		<dc:creator><![CDATA[Dasha Salo]]></dc:creator>
		<pubDate>Tue, 26 May 2009 09:22:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-52417</guid>
		<description><![CDATA[Great article! thank you!

I have a question - on query cost diagram it shows 50% for table scan for UNION ALL and 18% for UNION. Why is it so different? Because of the number of records?

If yes then UNION should be faster if it saves so much more resources on that stage?

Thnk you in advance!]]></description>
		<content:encoded><![CDATA[<p>Great article! thank you!</p>
<p>I have a question &#8211; on query cost diagram it shows 50% for table scan for UNION ALL and 18% for UNION. Why is it so different? Because of the number of records?</p>
<p>If yes then UNION should be faster if it saves so much more resources on that stage?</p>
<p>Thnk you in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shailwx</title>
		<link>http://blog.sqlauthority.com/2009/03/11/sql-server-difference-between-union-vs-union-all-optimal-performance-comparison/#comment-48822</link>
		<dc:creator><![CDATA[shailwx]]></dc:creator>
		<pubDate>Thu, 12 Mar 2009 08:02:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=3724#comment-48822</guid>
		<description><![CDATA[Very nice article :)
Just one question about the execution plans. I have observed that sometime the actual execution time is different from what is suggested. Like in a batch I see a query to occupy 40 % and query 60%.
But when I actually execute both of them, Query 1 takes more time than the query 2 
Is it possible ?]]></description>
		<content:encoded><![CDATA[<p>Very nice article :)<br />
Just one question about the execution plans. I have observed that sometime the actual execution time is different from what is suggested. Like in a batch I see a query to occupy 40 % and query 60%.<br />
But when I actually execute both of them, Query 1 takes more time than the query 2<br />
Is it possible ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

