<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>beer planet &#187; explain</title>
	<atom:link href="http://beerpla.net/tag/explain/feed/" rel="self" type="application/rss+xml" />
	<link>http://beerpla.net</link>
	<description>where things have nothing to do with beer - tutorials, tips, how-tos, thoughts, hacks, and other techy nonsense</description>
	<lastBuildDate>Tue, 27 Jul 2010 04:25:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<atom:link rel='hub' href='http://beerpla.net/?pushpress=hub'/>
		<item>
		<title>MySQL Conference Liveblogging: EXPLAIN Demystified (Tuesday 2:00PM)</title>
		<link>http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/</link>
		<comments>http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 21:27:03 +0000</pubDate>
		<dc:creator>Artem Russakovskii</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[explain]]></category>
		<category><![CDATA[MySQL]]></category>
		<guid isPermaLink="false">http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/</guid>
		<description><![CDATA[<ul>
<li>Baron Schwartz presents</li>
<li>only works for SELECTs</li>
<li>nobody dares admit if they&#039;ve never seen EXPLAIN</li>
<li>MySQL actually executes the query</li>
<li>at each JOIN, instead of executing the query, it fills the EXPLAIN result set</li>
<li>everything is a JOIN (even SELECT 1)</li>
<li><strong>Columns in EXPLAIN</strong></li>
</ul><ul>
<li>id: which SELECT the row belongs to</li>
<li>select_type</li>
</ul><ul>
<li>simple</li>
<li>subquery</li>
<li>derived</li>
<li>union</li>
<li>union result</li>
</ul>
<li>table: the table accessed or its alias</li>
<li>type:</li>
<ul>
<li>join</li>
<li>range</li>
<li>&#8230;</li>
</ul>
<li>possible_keys: which indexes looked useful to the optimizer</li>
<li>key: which index(es) the optimizer chose</li>
<li>key_len: the number of bytes of the index MySQL will use</li><p>...<div class=clear></div> <a href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/" class="read_more"><div class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description>
			<content:encoded><![CDATA[<ul>
<li>Baron Schwartz presents</li>
<li>only works for SELECTs</li>
<li>nobody dares admit if they&#039;ve never seen EXPLAIN</li>
<li>MySQL actually executes the query</li>
<li>at each JOIN, instead of executing the query, it fills the EXPLAIN result set</li>
<li>everything is a JOIN (even SELECT 1)</li>
<li><strong>Columns in EXPLAIN</strong></li>
<ul>
<li>id: which SELECT the row belongs to</li>
<li>select_type</li>
<ul>
<li>simple</li>
<li>subquery</li>
<li>derived</li>
<li>union</li>
<li>union result</li>
</ul>
<li>table: the table accessed or its alias</li>
<li>type:</li>
<ul>
<li>join</li>
<li>range</li>
<li>&#8230;</li>
</ul>
<li>possible_keys: which indexes looked useful to the optimizer</li>
<li>key: which index(es) the optimizer chose</li>
<li>key_len: the number of bytes of the index MySQL will use</li>
<li>ref: which columns/constants from preceding tables are used for lookups in the index named in the key column</li>
<li>rows: estimated number of rows to read</li>
<li>extra</li>
<ul>
<li>using index: covering index</li>
<li>using where: server post-filters rows from storage engine</li>
<li>using temporary: an implicit temp table (for sorting or grouping rows, DISTINCT). No indication of whether the temp table is in memory or on disk</li>
<li>using filesort: external sort to order result. No indication of which algorithm MySQL will use</li>
</ul>
</ul>
<li>shows an insane EXPLAIN output with 8 EXPLAIN rows</li>
<li><a href="http://www.maatkit.org/tools.html">maatkit</a> includes a tool called mk-visual-explain, which can construct a formatted tree</li>
<li>Baron shows a demo and answers questions</li>
<li>EXPLAIN EXTENDED followed by SHOW WARNINGS will give more output about how a query is executed</li>
</ul>
<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=MySQL+Conference+Liveblogging%3A+EXPLAIN+Demystified+%28Tuesday+2%3A00PM%29+-+http://bit.ly/bz9tNc&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/&amp;t=MySQL+Conference+Liveblogging%3A+EXPLAIN+Demystified+%28Tuesday+2%3A00PM%29" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/&amp;t=MySQL+Conference+Liveblogging%3A+EXPLAIN+Demystified+%28Tuesday+2%3A00PM%29" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/&amp;title=MySQL+Conference+Liveblogging%3A+EXPLAIN+Demystified+%28Tuesday+2%3A00PM%29" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/&amp;title=MySQL+Conference+Liveblogging%3A+EXPLAIN+Demystified+%28Tuesday+2%3A00PM%29" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/&amp;title=MySQL+Conference+Liveblogging%3A+EXPLAIN+Demystified+%28Tuesday+2%3A00PM%29" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/&amp;title=MySQL+Conference+Liveblogging%3A+EXPLAIN+Demystified+%28Tuesday+2%3A00PM%29" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-mail">
			<a href="mailto:?subject=%22MySQL%20Conference%20Liveblogging%3A%20EXPLAIN%20Demystified%20%28Tuesday%202%3A00PM%29%22&amp;body=Link: http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A %20%20%20Baron%20Schwartz%20presents%20%20%20%20only%20works%20for%20SELECTs%20%20%20%20nobody%20dares%20admit%20if%20they%27ve%20never%20seen%20EXPLAIN%20%20%20%20MySQL%20actually%20executes%20the%20query%20%20%20%20at%20each%20JOIN%2C%20instead%20of%20executing%20the%20query%2C%20it%20fills%20the%20EXPLAIN%20result%20set%20%20%20%20everything%20is%20a%20JOIN%20%28even%20SELECT%201%29%20%20%20%20Columns%20in%20EXPLAIN%20%20%20%20%20%20%20%20%20id%3A%20whi" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
Similar Posts:<ul><li><a href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/" rel="bookmark" title="April 16, 2008">MySQL Conference Liveblogging: MySQL Performance Under A Microscope: The Tobias And Jay Show (Wednesday 2:00PM)</a></li>
<li><a href="http://beerpla.net/2008/04/17/mysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm/" rel="bookmark" title="April 17, 2008">MySQL Conference Liveblogging: MySQL Hidden Treasures (Thursday 11:55PM)</a></li>
<li><a href="http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/" rel="bookmark" title="March 18, 2009">MySQL Indexing Considerations Of Implementing A Priority Field In Your Application</a></li>
<li><a href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/" rel="bookmark" title="April 16, 2008">MySQL Conference Liveblogging: Applied Partitioning And Scaling your (OLTP) Database System (Wednesday 11:55AM)</a></li>
<li><a href="http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/" rel="bookmark" title="May 11, 2009">[MySQL] Deleting/Updating Rows Common To 2 Tables &#8211; Speed And Slave Lag Considerations</a></li>
</ul><!-- Similar Posts took 9.809 ms --><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
