<?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>Fri, 06 Jan 2012 08:50:59 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</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><li>ref: which columns/constants from preceding tables are used for lookups in the index named in the key column</li><li>rows: estimated</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://www.shareaholic.com/api/share/?title=MySQL+Conference+Liveblogging%3A+EXPLAIN+Demystified+%28Tuesday+2%3A00PM%29&amp;link=http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/&amp;notes=%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&amp;short_link=http://bit.ly/bz9tNc&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Conference+Liveblogging%3A+EXPLAIN+Demystified+%28Tuesday+2%3A00PM%29&amp;link=http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/&amp;notes=%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&amp;short_link=http://bit.ly/bz9tNc&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Conference+Liveblogging%3A+EXPLAIN+Demystified+%28Tuesday+2%3A00PM%29&amp;link=http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/&amp;notes=%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&amp;short_link=http://bit.ly/bz9tNc&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Conference+Liveblogging%3A+EXPLAIN+Demystified+%28Tuesday+2%3A00PM%29&amp;link=http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/&amp;notes=%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&amp;short_link=http://bit.ly/bz9tNc&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Conference+Liveblogging%3A+EXPLAIN+Demystified+%28Tuesday+2%3A00PM%29&amp;link=http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/&amp;notes=%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&amp;short_link=http://bit.ly/bz9tNc&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Conference+Liveblogging%3A+EXPLAIN+Demystified+%28Tuesday+2%3A00PM%29&amp;link=http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/&amp;notes=%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&amp;short_link=http://bit.ly/bz9tNc&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" 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.shareaholic.com/api/share/?title=MySQL+Conference+Liveblogging%3A+EXPLAIN+Demystified+%28Tuesday+2%3A00PM%29&amp;link=http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/&amp;notes=%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&amp;short_link=http://bit.ly/bz9tNc&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" 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="http://www.shareaholic.com/api/share/?title=MySQL%20Conference%20Liveblogging%3A%20EXPLAIN%20Demystified%20%28Tuesday%202%3A00PM%29&amp;link=http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/&amp;notes=%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&amp;short_link=http://bit.ly/bz9tNc&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" 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><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2008%2F04%2F15%2Fmysql-conference-liveblogging-explain-demystified-tuesday-200p%2F&amp;title=MySQL%20Conference%20Liveblogging%3A%20EXPLAIN%20Demystified%20%28Tuesday%202%3A00PM%29" id="wpa2a_2"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
