<?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"
	>
<channel>
	<title>Comments on: UNION vs UNION ALL Performance</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/</link>
	<description>Everything about MySQL Performance</description>
	<pubDate>Tue, 02 Dec 2008 17:28:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: techfounder &#187; Optimizing OR (union) operations in MySQL</title>
		<link>http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-362007</link>
		<dc:creator>techfounder &#187; Optimizing OR (union) operations in MySQL</dc:creator>
		<pubDate>Wed, 15 Oct 2008 06:29:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-362007</guid>
		<description>[...] our OR condition with two UNION&#8217;ed select statements (the inspiration is from a couple of posts over at the MySQL performance blog). Breaking the original query into a UNION form results [...]</description>
		<content:encoded><![CDATA[<p>[...] our OR condition with two UNION&#8217;ed select statements (the inspiration is from a couple of posts over at the MySQL performance blog). Breaking the original query into a UNION form results [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charu</title>
		<link>http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-300973</link>
		<dc:creator>Charu</dc:creator>
		<pubDate>Mon, 19 May 2008 06:55:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-300973</guid>
		<description>Hi,

  Can someone answer my related query posted in the mysql performance forum.Query can be found here:

http://forum.mysqlperformanceblog.com/s/mv/tree/743/

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>  Can someone answer my related query posted in the mysql performance forum.Query can be found here:</p>
<p><a href="http://forum.mysqlperformanceblog.com/s/mv/tree/743/" rel="nofollow">http://forum.mysqlperformanceblog.com/s/mv/tree/743/</a></p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian Gomez Morales</title>
		<link>http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-257267</link>
		<dc:creator>Sebastian Gomez Morales</dc:creator>
		<pubDate>Tue, 25 Mar 2008 22:45:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-257267</guid>
		<description>great article! (as usual)
thanks a lot.
i was looking for this and this text was very helpful
keep the good work, boys</description>
		<content:encoded><![CDATA[<p>great article! (as usual)<br />
thanks a lot.<br />
i was looking for this and this text was very helpful<br />
keep the good work, boys</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ramasubramanian.G</title>
		<link>http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-255074</link>
		<dc:creator>ramasubramanian.G</dc:creator>
		<pubDate>Fri, 21 Mar 2008 09:45:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-255074</guid>
		<description>sldfj</description>
		<content:encoded><![CDATA[<p>sldfj</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: [PHP/MYSQL] Datenbankabfrage - Forum Fachinformatiker.de</title>
		<link>http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-212960</link>
		<dc:creator>[PHP/MYSQL] Datenbankabfrage - Forum Fachinformatiker.de</dc:creator>
		<pubDate>Wed, 05 Dec 2007 23:56:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-212960</guid>
		<description>[...]      Warum? UNION vs UNION ALL Performance &#124; MySQL Performance Blog  __________________ Siste gradum teque aspectu ne subtrahe nostro! Quem fugis? Extremum fato, quod [...]</description>
		<content:encoded><![CDATA[<p>[...]      Warum? UNION vs UNION ALL Performance | MySQL Performance Blog  __________________ Siste gradum teque aspectu ne subtrahe nostro! Quem fugis? Extremum fato, quod [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-186775</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Thu, 08 Nov 2007 21:06:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-186775</guid>
		<description>Hey Scott, 

This is what I mentioned too.  The point was not to see if it is faster but to get the measure of the thing in numbers.</description>
		<content:encoded><![CDATA[<p>Hey Scott, </p>
<p>This is what I mentioned too.  The point was not to see if it is faster but to get the measure of the thing in numbers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Marlowe</title>
		<link>http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-186685</link>
		<dc:creator>Scott Marlowe</dc:creator>
		<pubDate>Thu, 08 Nov 2007 17:48:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-186685</guid>
		<description>Union All is generally faster than union because it doesn't have to do a sort / unique step.

With union all, you smoosh two data sets together not caring if there are dups or not.  union (distinct) has to then go that extra step to remove dups.

TANSTAAFL</description>
		<content:encoded><![CDATA[<p>Union All is generally faster than union because it doesn&#8217;t have to do a sort / unique step.</p>
<p>With union all, you smoosh two data sets together not caring if there are dups or not.  union (distinct) has to then go that extra step to remove dups.</p>
<p>TANSTAAFL</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pythian Group Blog &#187; Blog Archive &#187; Log Buffer #66: a Carnival of the Vanities for DBAs</title>
		<link>http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-176801</link>
		<dc:creator>Pythian Group Blog &#187; Blog Archive &#187; Log Buffer #66: a Carnival of the Vanities for DBAs</dc:creator>
		<pubDate>Fri, 12 Oct 2007 16:34:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-176801</guid>
		<description>[...] Peter Zaitsev of the MySQL Performance Blog compares the performance of UNION vs. UNION ALL. [...]</description>
		<content:encoded><![CDATA[<p>[...] Peter Zaitsev of the MySQL Performance Blog compares the performance of UNION vs. UNION ALL. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-175272</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Sat, 06 Oct 2007 09:01:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-175272</guid>
		<description>Baron,

I think the most important thing here is the fact even UNION ALL uses temporary table, while it could simply be sending result sets one after another in many cases, possibly with little conversion to adjust data types. 

The unique index is in fact not index on all columns but some form of hash index - with MyISAM key limit index on all columns would not work for tables with long rows not to mention BLOBs</description>
		<content:encoded><![CDATA[<p>Baron,</p>
<p>I think the most important thing here is the fact even UNION ALL uses temporary table, while it could simply be sending result sets one after another in many cases, possibly with little conversion to adjust data types. </p>
<p>The unique index is in fact not index on all columns but some form of hash index - with MyISAM key limit index on all columns would not work for tables with long rows not to mention BLOBs</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-175166</link>
		<dc:creator>Xaprb</dc:creator>
		<pubDate>Sat, 06 Oct 2007 01:07:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/10/05/union-vs-union-all-performance/#comment-175166</guid>
		<description>I read the source for UNION once (Mark Leith pointed me to it).  It's not very much code.  The only difference between the two is the temporary table has the "distinct" property set, as I recall.  So of course that means a unique index on all columns, which is bound to be slow.

We should mention this in our book... it's such an instinct for me to use UNION ALL that I forgot about it.  I'll go look and see if we have mentioned it anywhere.</description>
		<content:encoded><![CDATA[<p>I read the source for UNION once (Mark Leith pointed me to it).  It&#8217;s not very much code.  The only difference between the two is the temporary table has the &#8220;distinct&#8221; property set, as I recall.  So of course that means a unique index on all columns, which is bound to be slow.</p>
<p>We should mention this in our book&#8230; it&#8217;s such an instinct for me to use UNION ALL that I forgot about it.  I&#8217;ll go look and see if we have mentioned it anywhere.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
