<?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; Databases</title> <atom:link href="http://beerpla.net/category/databases/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>Thu, 17 May 2012 22:50:53 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <atom:link rel='hub' href='http://beerpla.net/?pushpress=hub'/> <item><title>How To Fix Intermittent MySQL Errcode 13 Errors On Windows</title><link>http://beerpla.net/2010/01/05/how-to-fix-intermittent-mysql-errcode-13-errors-on-windows/</link> <comments>http://beerpla.net/2010/01/05/how-to-fix-intermittent-mysql-errcode-13-errors-on-windows/#comments</comments> <pubDate>Tue, 05 Jan 2010 10:49:33 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[13]]></category> <category><![CDATA[errcode]]></category> <category><![CDATA[errcode 13]]></category> <category><![CDATA[error]]></category> <category><![CDATA[mcafee]]></category> <category><![CDATA[microsoft security essentials]]></category> <category><![CDATA[myd]]></category> <category><![CDATA[myi]]></category> <category><![CDATA[myisam]]></category> <category><![CDATA[windows]]></category> <category><![CDATA[Wordpress]]></category> <guid
isPermaLink="false">http://beerpla.net/2010/01/05/how-to-fix-intermittent-mysql-errcode-13-errors-on-windows/</guid> <description><![CDATA[<p><img
style="margin: 0px 10px 10px 0px; display: inline" title="13" alt="13" align="left" src="http://beerpla.net/wp-content/uploads/HowToFixIntermittentMySQLErrcode13Errors_1A77/image.png" width="150" height="150" /></p><h2>The Problem</h2><p>I&#039;ve had MySQL on my Windows 7 laptop for a bit (as part of <a
href="http://www.wampserver.com/en/" rel="nofollow">wampserver</a>), mostly for local offline WordPress development.</p><p>However, even though MySQL is relatively stable, I&#039;ve been observing a vast quantity of intermittent MySQL errors, as reported by WordPress in the PHP error log (C:\wamp\logs\php_error.log). Here are some examples:</p><div
class="wp_syntax"><div
class="code"><pre>[05-Jan-2010 09:47:51] WordPress database error Error on delete of
'C:\Windows\TEMP\#sql17e0_1a2_6.MYD' (Errcode: 13) for query SELECT t.*, tt.*
FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id
INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id =
tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (3)
ORDER BY t.name ASC made by require, require_once, include, get_footer,
locate_template, load_template, require_once, dynamic_sidebar,
call_user_func_array, widget_rrm_recent_posts, RecentPosts-&#38;gt;execute,
ppl_expand_template, </pre></div>...<div
class=clear></div> <a
href="http://beerpla.net/2010/01/05/how-to-fix-intermittent-mysql-errcode-13-errors-on-windows/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></div>]]></description> <content:encoded><![CDATA[<p><img
style="margin: 0px 10px 10px 0px; display: inline" title="13" alt="13" align="left" src="http://beerpla.net/wp-content/uploads/HowToFixIntermittentMySQLErrcode13Errors_1A77/image.png" width="150" height="150" /></p><h2>The Problem</h2><p>I&#039;ve had MySQL on my Windows 7 laptop for a bit (as part of <a
href="http://www.wampserver.com/en/" rel="nofollow">wampserver</a>), mostly for local offline WordPress development.</p><p>However, even though MySQL is relatively stable, I&#039;ve been observing a vast quantity of intermittent MySQL errors, as reported by WordPress in the PHP error log (C:\wamp\logs\php_error.log). Here are some examples:</p><div
class="wp_syntax"><div
class="code"><pre>[05-Jan-2010 09:47:51] WordPress database error Error on delete of
'C:\Windows\TEMP\#sql17e0_1a2_6.MYD' (Errcode: 13) for query SELECT t.*, tt.*
FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id
INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id =
tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (3)
ORDER BY t.name ASC made by require, require_once, include, get_footer,
locate_template, load_template, require_once, dynamic_sidebar,
call_user_func_array, widget_rrm_recent_posts, RecentPosts-&amp;gt;execute,
ppl_expand_template, otf_categorylinks, get_the_category, wp_get_object_terms
&nbsp;
[05-Jan-2010 09:50:42] WordPress database error Error on delete of
'C:\Windows\TEMP\#sql17e0_1b0_0.MYD' (Errcode: 13) for query  SELECT
SQL_CALC_FOUND_ROWS  wp_posts.* FROM wp_posts  INNER JOIN wp_term_relationships
ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_term_taxonomy ON
(wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id)
WHERE 1=1  AND wp_term_taxonomy.taxonomy = 'category' AND
wp_term_taxonomy.term_id IN ('3') AND wp_posts.post_type = 'post' AND
(wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') GROUP BY
wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10 made by require, wp,
WP-&amp;gt;main, WP-&amp;gt;query_posts, WP_Query-&amp;gt;query, WP_Query-&amp;gt;get_posts</pre></div></div><p>The important part here is &quot;Errcode: 13&quot;, which is a file access error. The MySQL daemon process (mysqld.exe) randomly cannot access temporary tables it itself creates, which causes these errors and failed queries.</p><h2>Digging Around</h2><p>After looking around and finding nothing obvious, I tracked down a few forum posts mentioning the same issue.</p><p>Here is the gist &#8211; the problem is caused by an anti-virus program that is clearly not working properly.</p><p>The one mentioned on the forums is McAfee (big surprise, right? McAfee is a piece of junk &#8211; probably the worst anti-virus I&#039;ve ever tried). In my case, however, it was the recently installed freeware security program from Microsoft called <a
href="http://www.microsoft.com/Security_Essentials/" rel="nofollow">Microsoft Security Essentials</a>, highly praised but problematic in this case nonetheless.</p><p>After thinking about it, I am confident that these security programs don&#039;t actually purposely prohibit access to the files MySQL creates. Instead, they lock these files for the duration of the check, so that the system doesn&#039;t get infected before they are approved. If you notice, the problems are related to temporary tables, created by MySQL on the fly. MySQL probably has a very short access timeout for these files, for performance reasons, and because it doesn&#039;t get this access fast enough, it considers it a failure (file deletions are failing, as you can see in the log).</p><h2>The Solution</h2><p>Now onto fixing the problem. The solution is to have Microsoft Security Essentials, in my case, or whatever your security program may be ignore these files.</p><p>You can block the whole Temp directory from being checked. It is not a good idea, as viruses can trickle down to that location and bypass your anti-virus:</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToFixIntermittentMySQLErrcode13Errors_1A77/image_3.png" class="lightview" rel="gallery['1313']" title="Ignore Windows Temp dir in Microsoft Security Essentials"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="Ignore Windows Temp dir in Microsoft Security Essentials" alt="Ignore Windows Temp dir in Microsoft Security Essentials" src="http://beerpla.net/wp-content/uploads/HowToFixIntermittentMySQLErrcode13Errors_1A77/image_thumb.png" width="700" height="545" /></a></p><p>Instead, you should just ignore by file extension: *.MYI and *.MYD. MySQL uses files with these extensions for its MyISAM table types. Using this approach is obviously safer as it doesn&#039;t single out a directory and instead targets specific files:</p><p><a
href="http://beerpla.net/wp-content/uploads/HowToFixIntermittentMySQLErrcode13Errors_1A77/image_4.png" class="lightview" rel="gallery['1313']" title="Ignore *.MYI and *.MYD in Microsoft Security Essentials"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="Ignore *.MYI and *.MYD in Microsoft Security Essentials" alt="Ignore *.MYI and *.MYD in Microsoft Security Essentials" src="http://beerpla.net/wp-content/uploads/HowToFixIntermittentMySQLErrcode13Errors_1A77/image_thumb_3.png" width="700" height="545" /></a></p><p>After I applied either of these exclusions, all MySQL Error 13 problems went away immediately.</p><h2>Conclusion</h2><p>The intermittent Error 13 problem on Windows is caused by 2 otherwise legitimate processes which, when mixed together, end up breaking MySQL.</p><p>Is this entirely the fault of the antivirus programs? Inadvertently, perhaps so.</p><p>Could MySQL be a bit smarter in this scenario? Perhaps so as well.</p><p>What do you, MySQL pros, think?</p><div
class='post_blob_1'>We offer guaranteed success in <a
href="http://www.test-king.com/exams/646-671.htm">646-671</a> as well as <a
href="http://www.test-king.com/exams/646-985.htm">646-985</a> exam using world’s best quality <a
href="http://www.test-king.com/exams/E20-340.htm">E20-340</a> training resources.</div><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=How+To+Fix+Intermittent+MySQL+Errcode+13+Errors+On+Windows&amp;link=http://beerpla.net/2010/01/05/how-to-fix-intermittent-mysql-errcode-13-errors-on-windows/&amp;notes=%20%0D%0AThe%20Problem%0D%0AI%27ve%20had%20MySQL%20on%20my%20Windows%207%20laptop%20for%20a%20bit%20%28as%20part%20of%20wampserver%29%2C%20mostly%20for%20local%20offline%20Wordpress%20development.%0D%0AHowever%2C%20even%20though%20MySQL%20is%20relatively%20stable%2C%20I%27ve%20been%20observing%20a%20vast%20quantity%20of%20intermittent%20MySQL%20errors%2C%20as%20reported%20by%20Wordpress%20in%20the%20PHP%20error%20log%20%28&amp;short_link=http://bit.ly/cJxOPu&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=How+To+Fix+Intermittent+MySQL+Errcode+13+Errors+On+Windows&amp;link=http://beerpla.net/2010/01/05/how-to-fix-intermittent-mysql-errcode-13-errors-on-windows/&amp;notes=%20%0D%0AThe%20Problem%0D%0AI%27ve%20had%20MySQL%20on%20my%20Windows%207%20laptop%20for%20a%20bit%20%28as%20part%20of%20wampserver%29%2C%20mostly%20for%20local%20offline%20Wordpress%20development.%0D%0AHowever%2C%20even%20though%20MySQL%20is%20relatively%20stable%2C%20I%27ve%20been%20observing%20a%20vast%20quantity%20of%20intermittent%20MySQL%20errors%2C%20as%20reported%20by%20Wordpress%20in%20the%20PHP%20error%20log%20%28&amp;short_link=http://bit.ly/cJxOPu&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=How+To+Fix+Intermittent+MySQL+Errcode+13+Errors+On+Windows&amp;link=http://beerpla.net/2010/01/05/how-to-fix-intermittent-mysql-errcode-13-errors-on-windows/&amp;notes=%20%0D%0AThe%20Problem%0D%0AI%27ve%20had%20MySQL%20on%20my%20Windows%207%20laptop%20for%20a%20bit%20%28as%20part%20of%20wampserver%29%2C%20mostly%20for%20local%20offline%20Wordpress%20development.%0D%0AHowever%2C%20even%20though%20MySQL%20is%20relatively%20stable%2C%20I%27ve%20been%20observing%20a%20vast%20quantity%20of%20intermittent%20MySQL%20errors%2C%20as%20reported%20by%20Wordpress%20in%20the%20PHP%20error%20log%20%28&amp;short_link=http://bit.ly/cJxOPu&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=How+To+Fix+Intermittent+MySQL+Errcode+13+Errors+On+Windows&amp;link=http://beerpla.net/2010/01/05/how-to-fix-intermittent-mysql-errcode-13-errors-on-windows/&amp;notes=%20%0D%0AThe%20Problem%0D%0AI%27ve%20had%20MySQL%20on%20my%20Windows%207%20laptop%20for%20a%20bit%20%28as%20part%20of%20wampserver%29%2C%20mostly%20for%20local%20offline%20Wordpress%20development.%0D%0AHowever%2C%20even%20though%20MySQL%20is%20relatively%20stable%2C%20I%27ve%20been%20observing%20a%20vast%20quantity%20of%20intermittent%20MySQL%20errors%2C%20as%20reported%20by%20Wordpress%20in%20the%20PHP%20error%20log%20%28&amp;short_link=http://bit.ly/cJxOPu&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=How+To+Fix+Intermittent+MySQL+Errcode+13+Errors+On+Windows&amp;link=http://beerpla.net/2010/01/05/how-to-fix-intermittent-mysql-errcode-13-errors-on-windows/&amp;notes=%20%0D%0AThe%20Problem%0D%0AI%27ve%20had%20MySQL%20on%20my%20Windows%207%20laptop%20for%20a%20bit%20%28as%20part%20of%20wampserver%29%2C%20mostly%20for%20local%20offline%20Wordpress%20development.%0D%0AHowever%2C%20even%20though%20MySQL%20is%20relatively%20stable%2C%20I%27ve%20been%20observing%20a%20vast%20quantity%20of%20intermittent%20MySQL%20errors%2C%20as%20reported%20by%20Wordpress%20in%20the%20PHP%20error%20log%20%28&amp;short_link=http://bit.ly/cJxOPu&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=How+To+Fix+Intermittent+MySQL+Errcode+13+Errors+On+Windows&amp;link=http://beerpla.net/2010/01/05/how-to-fix-intermittent-mysql-errcode-13-errors-on-windows/&amp;notes=%20%0D%0AThe%20Problem%0D%0AI%27ve%20had%20MySQL%20on%20my%20Windows%207%20laptop%20for%20a%20bit%20%28as%20part%20of%20wampserver%29%2C%20mostly%20for%20local%20offline%20Wordpress%20development.%0D%0AHowever%2C%20even%20though%20MySQL%20is%20relatively%20stable%2C%20I%27ve%20been%20observing%20a%20vast%20quantity%20of%20intermittent%20MySQL%20errors%2C%20as%20reported%20by%20Wordpress%20in%20the%20PHP%20error%20log%20%28&amp;short_link=http://bit.ly/cJxOPu&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=How+To+Fix+Intermittent+MySQL+Errcode+13+Errors+On+Windows&amp;link=http://beerpla.net/2010/01/05/how-to-fix-intermittent-mysql-errcode-13-errors-on-windows/&amp;notes=%20%0D%0AThe%20Problem%0D%0AI%27ve%20had%20MySQL%20on%20my%20Windows%207%20laptop%20for%20a%20bit%20%28as%20part%20of%20wampserver%29%2C%20mostly%20for%20local%20offline%20Wordpress%20development.%0D%0AHowever%2C%20even%20though%20MySQL%20is%20relatively%20stable%2C%20I%27ve%20been%20observing%20a%20vast%20quantity%20of%20intermittent%20MySQL%20errors%2C%20as%20reported%20by%20Wordpress%20in%20the%20PHP%20error%20log%20%28&amp;short_link=http://bit.ly/cJxOPu&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=How%20To%20Fix%20Intermittent%20MySQL%20Errcode%2013%20Errors%20On%20Windows&amp;link=http://beerpla.net/2010/01/05/how-to-fix-intermittent-mysql-errcode-13-errors-on-windows/&amp;notes=%20%0D%0AThe%20Problem%0D%0AI%27ve%20had%20MySQL%20on%20my%20Windows%207%20laptop%20for%20a%20bit%20%28as%20part%20of%20wampserver%29%2C%20mostly%20for%20local%20offline%20Wordpress%20development.%0D%0AHowever%2C%20even%20though%20MySQL%20is%20relatively%20stable%2C%20I%27ve%20been%20observing%20a%20vast%20quantity%20of%20intermittent%20MySQL%20errors%2C%20as%20reported%20by%20Wordpress%20in%20the%20PHP%20error%20log%20%28&amp;short_link=http://bit.ly/cJxOPu&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/2010/03/21/how-to-diagnose-and-fix-incorrect-post-comment-counts-in-wordpress/" rel="bookmark" title="March 21, 2010">How To Diagnose And Fix Incorrect Post Comment Counts In WordPress</a></li><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: EXPLAIN Demystified (Tuesday 2:00PM)</a></li><li><a
href="http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/" rel="bookmark" title="February 17, 2009">Swapping Column Values in MySQL</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><li><a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-benchmarking-tools-wednesday-425pm/" rel="bookmark" title="April 16, 2008">MySQL Conference Liveblogging: Benchmarking Tools (Wednesday 4:25PM)</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%2F2010%2F01%2F05%2Fhow-to-fix-intermittent-mysql-errcode-13-errors-on-windows%2F&amp;title=How%20To%20Fix%20Intermittent%20MySQL%20Errcode%2013%20Errors%20On%20Windows" 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/2010/01/05/how-to-fix-intermittent-mysql-errcode-13-errors-on-windows/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>Comparison Between Solr And Sphinx Search Servers (Solr Vs Sphinx &#8211; Fight!)</title><link>http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/</link> <comments>http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/#comments</comments> <pubDate>Thu, 03 Sep 2009 15:00:00 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Solr]]></category> <category><![CDATA[backend]]></category> <category><![CDATA[compare]]></category> <category><![CDATA[comparison]]></category> <category><![CDATA[engine]]></category> <category><![CDATA[enterprise]]></category> <category><![CDATA[fulltext]]></category> <category><![CDATA[indexing]]></category> <category><![CDATA[search]]></category> <category><![CDATA[server]]></category> <category><![CDATA[sphinx]]></category> <guid
isPermaLink="false">http://beerpla.net/2009/09/03/detailed-comparison-between-solr-and-sphinx/</guid> <description><![CDATA[<p>In the past few weeks I&#039;ve been implementing advanced search at <a
rel="nofollow" href="http://www.plaxo.com">Plaxo</a>, working quite closely with <a
rel="nofollow" href="http://lucene.apache.org/solr/">Solr</a> enterprise search server. Today, I saw this relatively detailed comparison between Solr and its main competitor <a
rel="nofollow" href="http://www.sphinxsearch.com/">Sphinx</a> (full credit goes to StackOverflow user <a
rel="nofollow" href="http://stackoverflow.com/users/21239/mausch">mausch</a> who had been using Solr for the past 2 years). For those still confused, Solr and Sphinx are similar to MySQL FULLTEXT search, or for those even more confused, think Google (yeah, this is a bit of a stretch, I know).</p><h2>Similarities</h2><ul><li>Both Solr and Sphinx satisfy all of your requirements. They&#039;re fast and designed to index and search large bodies of data efficiently.</li><li>Both have a long list of high-traffic sites using them (<a
rel="nofollow" href="http://wiki.apache.org/solr/PublicServers">Solr</a>, <a
rel="nofollow" href="http://www.sphinxsearch.com/powered.html">Sphinx</a></li>...<div
class=clear></div> <a
href="http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ul>]]></description> <content:encoded><![CDATA[<p>In the past few weeks I&#039;ve been implementing advanced search at <a
rel="nofollow" href="http://www.plaxo.com">Plaxo</a>, working quite closely with <a
rel="nofollow" href="http://lucene.apache.org/solr/">Solr</a> enterprise search server. Today, I saw this relatively detailed comparison between Solr and its main competitor <a
rel="nofollow" href="http://www.sphinxsearch.com/">Sphinx</a> (full credit goes to StackOverflow user <a
rel="nofollow" href="http://stackoverflow.com/users/21239/mausch">mausch</a> who had been using Solr for the past 2 years). For those still confused, Solr and Sphinx are similar to MySQL FULLTEXT search, or for those even more confused, think Google (yeah, this is a bit of a stretch, I know).</p><h2>Similarities</h2><ul><li>Both Solr and Sphinx satisfy all of your requirements. They&#039;re fast and designed to index and search large bodies of data efficiently.</li><li>Both have a long list of high-traffic sites using them (<a
rel="nofollow" href="http://wiki.apache.org/solr/PublicServers">Solr</a>, <a
rel="nofollow" href="http://www.sphinxsearch.com/powered.html">Sphinx</a>)</li><li>Both offer commercial support. (<a
rel="nofollow" href="http://www.lucidimagination.com/">Solr</a>, <a
rel="nofollow" href="http://www.sphinxsearch.com/consulting.html">Sphinx</a>)</li><li>Both offer client API bindings for several platforms/languages (<a
rel="nofollow" href="http://www.sphinxsearch.com/contribs.html">Sphinx</a>, <a
rel="nofollow" href="http://wiki.apache.org/solr/#head-ab1768efa59b26cbd30f1acd03b633f1d110ed47">Solr</a>)</li><li>Both can be distributed to increase speed and capacity (<a
rel="nofollow" href="http://www.sphinxsearch.com/docs/current.html#distributed">Sphinx</a>, <a
rel="nofollow" href="http://wiki.apache.org/solr/DistributedSearch">Solr</a>)</li></ul><h2>Here are some differences</h2><ul><li>Solr, being an Apache project, is obviously is Apache2-licensed. <a
rel="nofollow" href="http://www.sphinxsearch.com/licensing.html">Sphinx is GPLv2</a>. This means that if you ever need to embed or extend (not just &#034;use&#034;) Sphinx in a commercial application, you&#039;ll have to buy a commercial license.</li><li>Solr is <a
rel="nofollow" href="http://wiki.apache.org/solr/Solrj#head-02003c15f194db1a691f8b9bb909145a60ccf498">easily embeddable</a> in Java applications.</li><li>Solr is built on top of Lucene, which is a proven technology over <a
rel="nofollow" href="http://svn.apache.org/viewvc/lucene/java/tags/LUCENE%5F1%5F0%5F1/">7 years old</a> with a <a
rel="nofollow" href="http://wiki.apache.org/lucene-java/PoweredBy">huge user base</a> (this is only a small part). Whenever Lucene gets a new feature or speedup, Solr gets it too. Many of the devs committing to Solr are also Lucene committers.</li><li>Sphinx integrates more tightly with RDBMSs, especially MySQL.</li><li>Solr can be <a
rel="nofollow" href="http://highscalability.com/how-rackspace-now-uses-mapreduce-and-hadoop-query-terabytes-data">integrated with Hadoop to build distributed applications</a></li><li>Solr can be <a
rel="nofollow" href="http://stackoverflow.com/questions/211411/using-nutch-crawler-with-solr">integrated with Nutch to quickly build a fully-fledged web search engine with crawler</a>.</li><li>Solr can <a
rel="nofollow" href="http://wiki.apache.org/solr/ExtractingRequestHandler">index proprietary formats like Microsoft Word, PDF, etc</a>. Sphinx <a
rel="nofollow" href="http://stackoverflow.com/questions/1207995/indexing-word-documents-and-pdfs-with-sphinx">can&#039;t</a>.</li><li>Solr comes with a <a
rel="nofollow" href="http://wiki.apache.org/solr/SpellCheckComponent">spell-checker out of the box</a>.</li><li>Solr comes with <a
rel="nofollow" href="http://wiki.apache.org/solr/SolrFacetingOverview">facet support out of the box</a>. Faceting in Sphinx <a
rel="nofollow" href="http://api-meal.eu/memo/128-faceted-search-with-sphinx-and-php/">takes more work</a>.</li><li><a
rel="nofollow" href="http://stackoverflow.com/questions/737275/pros-cons-of-full-text-search-engine-lucene-sphinx-postgresql-full-text-searc/737931#737931">Sphinx doesn&#039;t allow partial index updates for field data</a>.</li><li>In Sphinx, <a
rel="nofollow" href="http://www.sphinxsearch.com/docs/current.html#data-restrictions">all document ids must be unique unsigned non-zero integer numbers</a>. Solr <a
rel="nofollow" href="http://wiki.apache.org/solr/UniqueKey">doesn&#039;t even require a unique key for many operations</a>, and unique keys can be either integers or strings.</li><li>Solr supports <a
href="http://wiki.apache.org/solr/FieldCollapsing">field collapsing</a> to avoid duplicating similar results. Sphinx doesn&#039;t seem to provide any feature like this.</li></ul><h2>Related questions</h2><ul><li><a
title="http://stackoverflow.com/questions/1284083/choosing-a-stand-alone-full-text-search-server-sphinx-or-solr" rel="nofollow" href="http://stackoverflow.com/questions/1284083/choosing-a-stand-alone-full-text-search-server-sphinx-or-solr">http://stackoverflow.com/questions/1284083/choosing-a-stand-alone-full-text-search-server-sphinx-or-solr</a></li><li><a
rel="nofollow" href="http://stackoverflow.com/questions/1132284/full-text-searching-with-rails">http://stackoverflow.com/questions/1132284/full-text-searching-with-rails</a></li><li><a
rel="nofollow" href="http://stackoverflow.com/questions/737275/pros-cons-of-full-text-search-engine-lucene-sphinx-postgresql-full-text-searc">http://stackoverflow.com/questions/737275/pros-cons-of-full-text-search-engine-lucene-sphinx-postgresql-full-text-searc</a></li></ul><h2>Conclusion</h2><p>In my experience, Solr is very-very fast on the query side. It is also very powerful. The indexing side is very CPU and memory intensive and is an unfortunate side effect of having such a feature-rich, fast application. Nevertheless, I highly recommend Solr.</p><p>For disclaimer purposes, I have not had much experience with Sphinx and, again, all credit for this comparison goes to <a
rel="nofollow" href="http://stackoverflow.com/users/21239/mausch">mausch</a>.</p><p>By the way, here&#039;s a really good resource for Solr 1.4 that just came out: <a
href="http://www.amazon.com/dp/1847195881/?tag=beepla-20">Solr 1.4 Enterprise Search</a>. I have this book and it&#039;s quite helpful in explaining such topics as multicore setup, search methods, replication, etc.</p><p
align="center"><iframe
src="http://rcm.amazon.com/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=beepla-20&#038;o=1&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=10FE9736YVPPT7A0FBG2&#038;asins=1847195881" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p><div
class='post_blob_1'>We offer the best quality <a
href="http://www.test-king.com/exams/70-648.htm">70-648</a> resources. Use our latest <a
href="http://www.test-king.com/exams/1Y0-A08.htm">1Y0-A08</a> questions and <a
href="http://www.test-king.com/exams/642-357.htm">642-357</a> answers to pass your certification exams.</div><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Comparison+Between+Solr+And+Sphinx+Search+Servers+%28Solr+Vs+Sphinx+-+Fight%21%29&amp;link=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/&amp;notes=In%20the%20past%20few%20weeks%20I%27ve%20been%20implementing%20advanced%20search%20at%20Plaxo%2C%20working%20quite%20closely%20with%20Solr%20enterprise%20search%20server.%20Today%2C%20I%20saw%20this%20relatively%20detailed%20comparison%20between%20Solr%20and%20its%20main%20competitor%20Sphinx%20%28full%20credit%20goes%20to%20StackOverflow%20user%20mausch%20who%20had%20been%20using%20Solr%20for%20the&amp;short_link=http://bit.ly/9TGaBF&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=Comparison+Between+Solr+And+Sphinx+Search+Servers+%28Solr+Vs+Sphinx+-+Fight%21%29&amp;link=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/&amp;notes=In%20the%20past%20few%20weeks%20I%27ve%20been%20implementing%20advanced%20search%20at%20Plaxo%2C%20working%20quite%20closely%20with%20Solr%20enterprise%20search%20server.%20Today%2C%20I%20saw%20this%20relatively%20detailed%20comparison%20between%20Solr%20and%20its%20main%20competitor%20Sphinx%20%28full%20credit%20goes%20to%20StackOverflow%20user%20mausch%20who%20had%20been%20using%20Solr%20for%20the&amp;short_link=http://bit.ly/9TGaBF&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=Comparison+Between+Solr+And+Sphinx+Search+Servers+%28Solr+Vs+Sphinx+-+Fight%21%29&amp;link=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/&amp;notes=In%20the%20past%20few%20weeks%20I%27ve%20been%20implementing%20advanced%20search%20at%20Plaxo%2C%20working%20quite%20closely%20with%20Solr%20enterprise%20search%20server.%20Today%2C%20I%20saw%20this%20relatively%20detailed%20comparison%20between%20Solr%20and%20its%20main%20competitor%20Sphinx%20%28full%20credit%20goes%20to%20StackOverflow%20user%20mausch%20who%20had%20been%20using%20Solr%20for%20the&amp;short_link=http://bit.ly/9TGaBF&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=Comparison+Between+Solr+And+Sphinx+Search+Servers+%28Solr+Vs+Sphinx+-+Fight%21%29&amp;link=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/&amp;notes=In%20the%20past%20few%20weeks%20I%27ve%20been%20implementing%20advanced%20search%20at%20Plaxo%2C%20working%20quite%20closely%20with%20Solr%20enterprise%20search%20server.%20Today%2C%20I%20saw%20this%20relatively%20detailed%20comparison%20between%20Solr%20and%20its%20main%20competitor%20Sphinx%20%28full%20credit%20goes%20to%20StackOverflow%20user%20mausch%20who%20had%20been%20using%20Solr%20for%20the&amp;short_link=http://bit.ly/9TGaBF&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=Comparison+Between+Solr+And+Sphinx+Search+Servers+%28Solr+Vs+Sphinx+-+Fight%21%29&amp;link=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/&amp;notes=In%20the%20past%20few%20weeks%20I%27ve%20been%20implementing%20advanced%20search%20at%20Plaxo%2C%20working%20quite%20closely%20with%20Solr%20enterprise%20search%20server.%20Today%2C%20I%20saw%20this%20relatively%20detailed%20comparison%20between%20Solr%20and%20its%20main%20competitor%20Sphinx%20%28full%20credit%20goes%20to%20StackOverflow%20user%20mausch%20who%20had%20been%20using%20Solr%20for%20the&amp;short_link=http://bit.ly/9TGaBF&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=Comparison+Between+Solr+And+Sphinx+Search+Servers+%28Solr+Vs+Sphinx+-+Fight%21%29&amp;link=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/&amp;notes=In%20the%20past%20few%20weeks%20I%27ve%20been%20implementing%20advanced%20search%20at%20Plaxo%2C%20working%20quite%20closely%20with%20Solr%20enterprise%20search%20server.%20Today%2C%20I%20saw%20this%20relatively%20detailed%20comparison%20between%20Solr%20and%20its%20main%20competitor%20Sphinx%20%28full%20credit%20goes%20to%20StackOverflow%20user%20mausch%20who%20had%20been%20using%20Solr%20for%20the&amp;short_link=http://bit.ly/9TGaBF&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=Comparison+Between+Solr+And+Sphinx+Search+Servers+%28Solr+Vs+Sphinx+-+Fight%21%29&amp;link=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/&amp;notes=In%20the%20past%20few%20weeks%20I%27ve%20been%20implementing%20advanced%20search%20at%20Plaxo%2C%20working%20quite%20closely%20with%20Solr%20enterprise%20search%20server.%20Today%2C%20I%20saw%20this%20relatively%20detailed%20comparison%20between%20Solr%20and%20its%20main%20competitor%20Sphinx%20%28full%20credit%20goes%20to%20StackOverflow%20user%20mausch%20who%20had%20been%20using%20Solr%20for%20the&amp;short_link=http://bit.ly/9TGaBF&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=Comparison%20Between%20Solr%20And%20Sphinx%20Search%20Servers%20%28Solr%20Vs%20Sphinx%20-%20Fight%21%29&amp;link=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/&amp;notes=In%20the%20past%20few%20weeks%20I%27ve%20been%20implementing%20advanced%20search%20at%20Plaxo%2C%20working%20quite%20closely%20with%20Solr%20enterprise%20search%20server.%20Today%2C%20I%20saw%20this%20relatively%20detailed%20comparison%20between%20Solr%20and%20its%20main%20competitor%20Sphinx%20%28full%20credit%20goes%20to%20StackOverflow%20user%20mausch%20who%20had%20been%20using%20Solr%20for%20the&amp;short_link=http://bit.ly/9TGaBF&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/2009/09/21/solr-how-to-fix-java-io-ioexception-directory-foo-exists-and-is-a-directory-but-cannot-be-listed-list-returned-null/" rel="bookmark" title="September 21, 2009">[Solr] How To Fix java.io.IOException: directory FOO exists and is a directory, but cannot be listed: list() returned null</a></li><li><a
href="http://beerpla.net/2009/08/18/delicious-com-quietly-rolls-out-domain-and-url-searchingfiltering-finally/" rel="bookmark" title="August 18, 2009">Delicious.com [Quietly] Rolls Out Domain And Url Searching/Filtering. Finally!</a></li><li><a
href="http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/" rel="bookmark" title="June 21, 2009">Hidden Features Of Perl, PHP, Javascript, C, C++, C#, Java, Ruby, Python, And Others [Collection Of Incredibly Useful Lists]</a></li><li><a
href="http://beerpla.net/2008/04/13/my-mysql-conference-schedule/" rel="bookmark" title="April 13, 2008">My MySQL Conference Schedule</a></li><li><a
href="http://beerpla.net/2011/06/13/goodbye-outlook-i-dont-need-you-anymore-gmail-now-lets-you-paste-images-directly-from-clipboard/" rel="bookmark" title="June 13, 2011">[Updated x3] Goodbye Outlook, I Don&#039;t Need You Anymore &#8211; Gmail Now Lets You Paste Images Directly From Clipboard</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%2F2009%2F09%2F03%2Fcomparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight%2F&amp;title=Comparison%20Between%20Solr%20And%20Sphinx%20Search%20Servers%20%28Solr%20Vs%20Sphinx%20%26%238211%3B%20Fight%21%29" id="wpa2a_4"><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/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>Hidden Features Of Perl, PHP, Javascript, C, C++, C#, Java, Ruby, Python, And Others [Collection Of Incredibly Useful Lists]</title><link>http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/</link> <comments>http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/#comments</comments> <pubDate>Sun, 21 Jun 2009 19:38:56 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[C]]></category> <category><![CDATA[C Sharp]]></category> <category><![CDATA[C++]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[Databases]]></category> <category><![CDATA[Java]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Perl]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Ruby]]></category> <category><![CDATA[asp.net]]></category> <category><![CDATA[bash]]></category> <category><![CDATA[code]]></category> <category><![CDATA[delphi]]></category> <category><![CDATA[Eclipse]]></category> <category><![CDATA[emacs]]></category> <category><![CDATA[f#]]></category> <category><![CDATA[feature]]></category> <category><![CDATA[featured]]></category> <category><![CDATA[flash]]></category> <category><![CDATA[framework]]></category> <category><![CDATA[greasemonkey]]></category> <category><![CDATA[haskell]]></category> <category><![CDATA[hidden]]></category> <category><![CDATA[http]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[language]]></category> <category><![CDATA[lua]]></category> <category><![CDATA[mod_rewrite]]></category> <category><![CDATA[objective-c]]></category> <category><![CDATA[oracle]]></category> <category><![CDATA[program]]></category> <category><![CDATA[regex]]></category> <category><![CDATA[ror]]></category> <category><![CDATA[ruby on rails]]></category> <category><![CDATA[scala]]></category> <category><![CDATA[secret]]></category> <category><![CDATA[spring]]></category> <category><![CDATA[tcl]]></category> <category><![CDATA[vb.net]]></category> <category><![CDATA[xpath]]></category> <category><![CDATA[xslt]]></category> <guid
isPermaLink="false">http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/</guid> <description><![CDATA[<h2 align="left">Introduction</h2><p><a
href="http://www.stackoverflow.com">StackOverflow</a> is an amazing site for coding questions. It was created by <a
href="http://twitter.com/Spolsky" rel="nofollow">Joel Spolsky</a> of <a
href="http://joelonsoftware.com" rel="nofollow">joelonsoftware.com</a>, <a
href="http://twitter.com/codinghorror" rel="nofollow">Jeff Atwood</a> of <a
href="http://codinghorror.com" rel="nofollow">codinghorror.com</a>, and some other incredibly smart guys who truly care about user experience. I have been a total fan of SO since it went mainstream and it&#039;s now a borderline addiction (you can see my StackOverflow badge on the right sidebar).</p><h2 align="left">The Story</h2><p
align="left"><div
class="note"><div
class="noteimportant"></div></div></p><p
align="left"><strong>Update 6/21/09</strong>: This server is currently under very heavy load (10-200), even with caching plugins enabled. Please bear with me as I try to resolve the situation.</p><p
align="left">Feel free to <a
href="http://www.addtoany.com/share_save?&#38;linkurl=http%3A%2F%2Fbeerpla.net%2F2009%2F06%2F21%2Fhidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists%2F&#38;linkname=Hidden%20Features%20Of%20Perl%2C%20PHP%2C%20Javascript%2C%20C%2C%20C%2B%2B%2C%20C%23%2C%20Java%2C%20Ruby%2C%20Python%2C%20And%20Others%20%5BCollection%20Of%20Incredibly%20Useful%20Lists%5D">bookmark this page</a> and return to it later when the fires have been put out.</p><p
align="left"><strong>Update 06/21/09</strong>: I think I&#039;ve got the situation ...<div
class=clear></div> <a
href="http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<h2 align="left">Introduction</h2><p><a
href="http://www.stackoverflow.com">StackOverflow</a> is an amazing site for coding questions. It was created by <a
href="http://twitter.com/Spolsky" rel="nofollow">Joel Spolsky</a> of <a
href="http://joelonsoftware.com" rel="nofollow">joelonsoftware.com</a>, <a
href="http://twitter.com/codinghorror" rel="nofollow">Jeff Atwood</a> of <a
href="http://codinghorror.com" rel="nofollow">codinghorror.com</a>, and some other incredibly smart guys who truly care about user experience. I have been a total fan of SO since it went mainstream and it&#039;s now a borderline addiction (you can see my StackOverflow badge on the right sidebar).</p><h2 align="left">The Story</h2><p
align="left"><div
class="note"><div
class="noteimportant"></p><p
align="left"><strong>Update 6/21/09</strong>: This server is currently under very heavy load (10-200), even with caching plugins enabled. Please bear with me as I try to resolve the situation.</p><p
align="left">Feel free to <a
href="http://www.addtoany.com/share_save?&amp;linkurl=http%3A%2F%2Fbeerpla.net%2F2009%2F06%2F21%2Fhidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists%2F&amp;linkname=Hidden%20Features%20Of%20Perl%2C%20PHP%2C%20Javascript%2C%20C%2C%20C%2B%2B%2C%20C%23%2C%20Java%2C%20Ruby%2C%20Python%2C%20And%20Others%20%5BCollection%20Of%20Incredibly%20Useful%20Lists%5D">bookmark this page</a> and return to it later when the fires have been put out.</p><p
align="left"><strong>Update 06/21/09</strong>: I think I&#039;ve got the situation under control now. The load is between 0 and 3 now and pages load relatively fast. I will be posting about the getting redditted/delicioused experience later.</p><p
align="left"><strong>Update 06/23/09</strong>: Added jQuery, Greasemonkey, Ruby on Rails, and Objective-C, broke databases into their own section, and sorted everything alphabetically.</p><p
align="left"><strong>Update 06/23/09</strong>: Added Scala, Lua, TCL, F#, Regex, and HTTP.</p><p
align="left"><strong>Update 07/21/09</strong>: Added ActionScript3/Flex, Erlang, PL/SQL, Silverlight, VBA, VHDL, WPF/XAML.</p><p
align="left"><strong>Update 10/24/09</strong>: Added Flash development/language/IDE, Emacs, Xpath/Xslt, Spring framework.</p><p
align="left"><strong>Update 01/18/10</strong>: Added Android (asked by yours truly), Qt, Django, Windows.Forms, R, Lisp, x86 assembly, Grails.</p><p
align="left"></div></div></p><p>So, one day someone at StackOverflow started a &quot;Hidden features of&quot; post about a famous language (I don&#039;t feel like finding out which one was first exactly), and it turned out to be so popular that other posts in the same series started popping up.</p><p>Such questions were quickly turned into community wikis, for the purposes of harvesting and organizing information coming from the best developers on the planet and voted by users of the site. There are literally hundreds of answers, sorted by votes.</p><p><div
class="note"><div
class="notetip">The Hidden Features series is great for people who are new to a certain language. It shows the ropes and tricks, all in one place, in the most concise manner possible. Even pros oftentimes find features of their favorite language that they&#039;d never heard about.</div></div></p><h2 align="center">Hidden Features Of</h2><h3>Programming Languages</h3><h4><a
href="http://stackoverflow.com/questions/1103705/hidden-features-of-actionscript3-flex">Hidden features of ActionScript3 / Flex</a></h4><h4><a
href="http://stackoverflow.com/questions/54929/hidden-features-of-asp-net">Hidden features of ASP.NET </a></h4><h4><a
href="http://stackoverflow.com/questions/1574308/hidden-features-of-x86-assembly-language" rel="nofollow">Hidden features of x86 assembly</a></h4><h4><a
href="http://stackoverflow.com/questions/132241/hidden-features-of-c">Hidden features of C</a></h4><h4><a
href="http://stackoverflow.com/questions/75538/hidden-features-of-c">Hidden features of C++</a></h4><h4><a
href="http://stackoverflow.com/questions/9033/hidden-features-of-c">Hidden features of C#</a></h4><h4><a
href="http://stackoverflow.com/questions/1853653/hidden-features-of-coldfusion" rel="nofollow">Hidden features of ColdFusion</a></h4><h4><a
href="http://stackoverflow.com/questions/125008/hidden-features-of-d">Hidden features of D </a></h4><h4><a
href="http://stackoverflow.com/questions/102254/hidden-features-of-delphi" rel="nofollow">Hidden features of Delphi</a></h4><h4><a
href="http://stackoverflow.com/questions/1063497/hidden-features-of-erlang" rel="nofollow">Hidden features of Erlang</a></h4><h4><a
href="http://stackoverflow.com/questions/181613/hidden-features-of-f">Hidden features of F# </a></h4><h4><a
href="http://stackoverflow.com/questions/1160680/hidden-features-tricks-of-flash-development-flash-language-as2-3-and-flash-id" rel="nofollow">Hidden features of Flash development, Flash language (AS2/3), and Flash IDE</a></h4><h4><a
href="http://stackoverflow.com/questions/15496/hidden-features-of-java">Hidden features of Java</a></h4><h4><a
href="http://stackoverflow.com/questions/61088/hidden-features-of-javascript">Hidden features of JavaScript</a></h4><h4><a
href="http://stackoverflow.com/questions/211216/hidden-features-of-haskell">Hidden features of Haskell </a></h4><h4><a
href="http://stackoverflow.com/questions/1598854/hidden-features-of-emacs-lisp" rel="nofollow">Hidden features of Lisp</a></h4><h4><a
href="http://stackoverflow.com/questions/523867/hidden-features-of-lua">Hidden features of Lua </a></h4><h4><a
href="http://stackoverflow.com/questions/211616/hidden-features-of-objective-c">Hidden features of Objective-C </a></h4><h4><a
href="http://stackoverflow.com/questions/161872/hidden-features-of-perl">Hidden features of Perl</a></h4><h4><a
href="http://stackoverflow.com/questions/61401/hidden-features-of-php">Hidden features of PHP</a></h4><h4><a
href="http://stackoverflow.com/questions/101268/hidden-features-of-python">Hidden features of Python</a></h4><h4><a
href="http://stackoverflow.com/questions/1682874/hidden-features-of-r" rel="nofollow">Hidden features of R</a></h4><h4><a
href="http://stackoverflow.com/questions/63998/hidden-features-of-ruby">Hidden features of Ruby</a></h4><h4><a
href="http://stackoverflow.com/questions/709679/hidden-features-of-ruby-on-rails">Hidden features of Ruby on Rails </a></h4><h4><a
href="http://stackoverflow.com/questions/1025181/hidden-features-of-scala">Hidden features of Scala </a></h4><h4><a
href="http://stackoverflow.com/questions/1031450/are-there-any-undocumented-features-in-silverlight">Hidden features of Silverlight</a></h4><h4><a
href="http://stackoverflow.com/questions/1596139/hidden-features-and-dark-corners-of-stl" rel="nofollow">Hidden features and Dark Corners of STL?</a></h4><h4><a
href="http://stackoverflow.com/questions/1024711/hidden-features-of-tcl-tk">Hidden features of TCL/TK</a></h4><h4><a
href="http://stackoverflow.com/questions/102084/hidden-features-of-vb-net">Hidden features of VB.Net </a></h4><h4><a
href="http://stackoverflow.com/questions/1070863/hidden-features-of-vba">Hidden features of VBA</a></h4><h3>Databases</h3><h4><a
href="http://stackoverflow.com/questions/368858/hidden-features-of-mysql">Hidden features of MySQL </a></h4><h4><a
href="http://stackoverflow.com/questions/381231/hidden-features-in-oracle">Hidden features of Oracle </a></h4><h4><a
href="http://stackoverflow.com/questions/1031485/hidden-features-of-pl-sql">Hidden features of PL/SQL</a></h4><h4><a
href="http://stackoverflow.com/questions/761327/hidden-features-of-postgresql">Hidden features of PostgreSQL </a></h4><h4><a
href="http://stackoverflow.com/questions/121243/hidden-features-of-sql-server">Hidden features of SQL Server </a></h4><h3>Mobile</h3><h4><a
href="http://stackoverflow.com/questions/1619133/hidden-features-of-android-development" rel="nofollow">Hidden features of Android development</a></h4><h3>Other</h3><h4><a
href="http://stackoverflow.com/questions/211378/hidden-features-of-bash">Hidden features of Bash</a> &#8211; also see my <a
href="http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/">bash cheatsheet</a>.</h4><h4><a
href="http://stackoverflow.com/questions/628407/css-hidden-features">Hidden features of CSS</a></h4><h4><a
href="http://stackoverflow.com/questions/1858520/hidden-features-of-django" rel="nofollow">Hidden features of Django</a></h4><h4><a
href="http://stackoverflow.com/questions/54886/hidden-features-tricks-for-eclipse">Hidden features of Eclipse </a></h4><h4><a
href="http://stackoverflow.com/questions/1598854/hidden-features-of-emacs-lisp" rel="nofollow">Hidden features of Emacs</a></h4><h4><a
href="http://stackoverflow.com/questions/1330531/hidden-features-of-grails" rel="nofollow">Hidden features of Grails</a></h4><h4><a
href="http://stackoverflow.com/questions/121167/hidden-features-of-greasemonkey">Hidden features of Greasemonkey </a></h4><h4><a
href="http://stackoverflow.com/questions/954327/hidden-features-of-html">Hidden features of HTML </a></h4><h4><a
href="http://stackoverflow.com/questions/954894/hidden-features-of-http">Hidden features of HTTP </a></h4><h4><a
href="http://stackoverflow.com/questions/121965/hidden-or-not-widely-known-features-of-jquery">Hidden features of jQuery</a></h4><h4><a
href="http://stackoverflow.com/questions/286004/hidden-features-of-modrewrite">Hidden features of mod_rewrite </a></h4><h4><a
href="http://stackoverflow.com/questions/1826458/hidden-features-of-qt" rel="nofollow">Hidden features of Qt</a></h4><h4><a
href="http://stackoverflow.com/questions/868181/hidden-features-of-regex">Hidden features of RegEx </a></h4><h4><a
href="http://stackoverflow.com/questions/1416423/hidden-features-of-spring-framework">Hidden features of Spring framework </a></h4><h4><a
href="http://stackoverflow.com/questions/1025699/hidden-features-of-vhdl">Hidden features of VHDL</a></h4><h4><a
href="http://stackoverflow.com/questions/100420/hidden-features-of-visual-studio-2005-2008">Hidden features of Visual Studio (2005-2008) </a></h4><h4><a
href="http://stackoverflow.com/questions/1777303/hidden-features-of-windows-forms" rel="nofollow">Hidden features of Windows.Forms</a></h4><h4><a
href="http://stackoverflow.com/questions/1124769/hidden-features-of-wpf-and-xaml">Hidden features of WPF and XAML</a></h4><h4><a
href="http://stackoverflow.com/questions/1521851/hidden-features-of-xpathxslt">Hidden features of Xpath+Xslt</a></h4><p>I will try to maintain this list, adding new languages that join the series as I find them. Now go learn something new!</p><div
class='post_blob_1'>Real <a
href="http://www.test-king.com/exams/70-432.htm">70-432</a> exam preparation with help of easy to understand <a
href="http://www.test-king.com/exams/220-702.htm">220-702</a> notes and <a
href="http://www.test-king.com/exams/640-553.htm">640-553</a> practice questions.</div><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Hidden+Features+Of+Perl%2C+PHP%2C+Javascript%2C+C%2C+C%2B%2B%2C+C%23%2C+Java%2C+Ruby%2C+Python%2C+And+Others+%5BCollection+Of+Incredibly+Useful+Lists%5D&amp;link=http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/&amp;notes=Introduction%0D%0AStackOverflow%20is%20an%20amazing%20site%20for%20coding%20questions.%20It%20was%20created%20by%20Joel%20Spolsky%20of%20joelonsoftware.com%2C%20Jeff%20Atwood%20of%20codinghorror.com%2C%20and%20some%20other%20incredibly%20smart%20guys%20who%20truly%20care%20about%20user%20experience.%20I%20have%20been%20a%20total%20fan%20of%20SO%20since%20it%20went%20mainstream%20and%20it%27s%20now%20a&amp;short_link=http://bit.ly/capw5J&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=Hidden+Features+Of+Perl%2C+PHP%2C+Javascript%2C+C%2C+C%2B%2B%2C+C%23%2C+Java%2C+Ruby%2C+Python%2C+And+Others+%5BCollection+Of+Incredibly+Useful+Lists%5D&amp;link=http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/&amp;notes=Introduction%0D%0AStackOverflow%20is%20an%20amazing%20site%20for%20coding%20questions.%20It%20was%20created%20by%20Joel%20Spolsky%20of%20joelonsoftware.com%2C%20Jeff%20Atwood%20of%20codinghorror.com%2C%20and%20some%20other%20incredibly%20smart%20guys%20who%20truly%20care%20about%20user%20experience.%20I%20have%20been%20a%20total%20fan%20of%20SO%20since%20it%20went%20mainstream%20and%20it%27s%20now%20a&amp;short_link=http://bit.ly/capw5J&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=Hidden+Features+Of+Perl%2C+PHP%2C+Javascript%2C+C%2C+C%2B%2B%2C+C%23%2C+Java%2C+Ruby%2C+Python%2C+And+Others+%5BCollection+Of+Incredibly+Useful+Lists%5D&amp;link=http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/&amp;notes=Introduction%0D%0AStackOverflow%20is%20an%20amazing%20site%20for%20coding%20questions.%20It%20was%20created%20by%20Joel%20Spolsky%20of%20joelonsoftware.com%2C%20Jeff%20Atwood%20of%20codinghorror.com%2C%20and%20some%20other%20incredibly%20smart%20guys%20who%20truly%20care%20about%20user%20experience.%20I%20have%20been%20a%20total%20fan%20of%20SO%20since%20it%20went%20mainstream%20and%20it%27s%20now%20a&amp;short_link=http://bit.ly/capw5J&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=Hidden+Features+Of+Perl%2C+PHP%2C+Javascript%2C+C%2C+C%2B%2B%2C+C%23%2C+Java%2C+Ruby%2C+Python%2C+And+Others+%5BCollection+Of+Incredibly+Useful+Lists%5D&amp;link=http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/&amp;notes=Introduction%0D%0AStackOverflow%20is%20an%20amazing%20site%20for%20coding%20questions.%20It%20was%20created%20by%20Joel%20Spolsky%20of%20joelonsoftware.com%2C%20Jeff%20Atwood%20of%20codinghorror.com%2C%20and%20some%20other%20incredibly%20smart%20guys%20who%20truly%20care%20about%20user%20experience.%20I%20have%20been%20a%20total%20fan%20of%20SO%20since%20it%20went%20mainstream%20and%20it%27s%20now%20a&amp;short_link=http://bit.ly/capw5J&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=Hidden+Features+Of+Perl%2C+PHP%2C+Javascript%2C+C%2C+C%2B%2B%2C+C%23%2C+Java%2C+Ruby%2C+Python%2C+And+Others+%5BCollection+Of+Incredibly+Useful+Lists%5D&amp;link=http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/&amp;notes=Introduction%0D%0AStackOverflow%20is%20an%20amazing%20site%20for%20coding%20questions.%20It%20was%20created%20by%20Joel%20Spolsky%20of%20joelonsoftware.com%2C%20Jeff%20Atwood%20of%20codinghorror.com%2C%20and%20some%20other%20incredibly%20smart%20guys%20who%20truly%20care%20about%20user%20experience.%20I%20have%20been%20a%20total%20fan%20of%20SO%20since%20it%20went%20mainstream%20and%20it%27s%20now%20a&amp;short_link=http://bit.ly/capw5J&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=Hidden+Features+Of+Perl%2C+PHP%2C+Javascript%2C+C%2C+C%2B%2B%2C+C%23%2C+Java%2C+Ruby%2C+Python%2C+And+Others+%5BCollection+Of+Incredibly+Useful+Lists%5D&amp;link=http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/&amp;notes=Introduction%0D%0AStackOverflow%20is%20an%20amazing%20site%20for%20coding%20questions.%20It%20was%20created%20by%20Joel%20Spolsky%20of%20joelonsoftware.com%2C%20Jeff%20Atwood%20of%20codinghorror.com%2C%20and%20some%20other%20incredibly%20smart%20guys%20who%20truly%20care%20about%20user%20experience.%20I%20have%20been%20a%20total%20fan%20of%20SO%20since%20it%20went%20mainstream%20and%20it%27s%20now%20a&amp;short_link=http://bit.ly/capw5J&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=Hidden+Features+Of+Perl%2C+PHP%2C+Javascript%2C+C%2C+C%2B%2B%2C+C%23%2C+Java%2C+Ruby%2C+Python%2C+And+Others+%5BCollection+Of+Incredibly+Useful+Lists%5D&amp;link=http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/&amp;notes=Introduction%0D%0AStackOverflow%20is%20an%20amazing%20site%20for%20coding%20questions.%20It%20was%20created%20by%20Joel%20Spolsky%20of%20joelonsoftware.com%2C%20Jeff%20Atwood%20of%20codinghorror.com%2C%20and%20some%20other%20incredibly%20smart%20guys%20who%20truly%20care%20about%20user%20experience.%20I%20have%20been%20a%20total%20fan%20of%20SO%20since%20it%20went%20mainstream%20and%20it%27s%20now%20a&amp;short_link=http://bit.ly/capw5J&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=Hidden%20Features%20Of%20Perl%2C%20PHP%2C%20Javascript%2C%20C%2C%20C%2B%2B%2C%20C%23%2C%20Java%2C%20Ruby%2C%20Python%2C%20And%20Others%20%5BCollection%20Of%20Incredibly%20Useful%20Lists%5D&amp;link=http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/&amp;notes=Introduction%0D%0AStackOverflow%20is%20an%20amazing%20site%20for%20coding%20questions.%20It%20was%20created%20by%20Joel%20Spolsky%20of%20joelonsoftware.com%2C%20Jeff%20Atwood%20of%20codinghorror.com%2C%20and%20some%20other%20incredibly%20smart%20guys%20who%20truly%20care%20about%20user%20experience.%20I%20have%20been%20a%20total%20fan%20of%20SO%20since%20it%20went%20mainstream%20and%20it%27s%20now%20a&amp;short_link=http://bit.ly/capw5J&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/2009/10/24/are-you-a-stackoverflow-com-superuser-com-serverfault-com-fan-heres-a-greasemonkey-script-to-keep-track-of-your-accounts-on-all-of-them/" rel="bookmark" title="October 24, 2009">StackOverflow.com, SuperUser.com, ServerFault.com Fan? Here&#039;s A Greasemonkey Script To Keep Track Of All Your Accounts</a></li><li><a
href="http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/" rel="bookmark" title="September 3, 2009">Comparison Between Solr And Sphinx Search Servers (Solr Vs Sphinx &#8211; Fight!)</a></li><li><a
href="http://beerpla.net/2009/03/17/twitter-autocomplete-auto-url-expansion-auto-url-shortener-auto-pagination-rt-button-nested-replies-inline-media-embed-search-tabs-and-more/" rel="bookmark" title="March 17, 2009">Twitter.com Autocomplete, Auto URL Expansion, Auto URL Shortener, RT Button, Nested Replies, Inline Media Embed, Search Tabs, And More</a></li><li><a
href="http://beerpla.net/2010/01/18/wordpress-developers-how-do-you-make-a-living-poll-discussion/" rel="bookmark" title="January 18, 2010">WordPress Developers &#8211; How Do You Make A Living [Poll + Discussion]?</a></li><li><a
href="http://beerpla.net/2009/08/18/delicious-com-quietly-rolls-out-domain-and-url-searchingfiltering-finally/" rel="bookmark" title="August 18, 2009">Delicious.com [Quietly] Rolls Out Domain And Url Searching/Filtering. Finally!</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%2F2009%2F06%2F21%2Fhidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists%2F&amp;title=Hidden%20Features%20Of%20Perl%2C%20PHP%2C%20Javascript%2C%20C%2C%20C%2B%2B%2C%20C%23%2C%20Java%2C%20Ruby%2C%20Python%2C%20And%20Others%20%5BCollection%20Of%20Incredibly%20Useful%20Lists%5D" id="wpa2a_6"><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/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/feed/</wfw:commentRss> <slash:comments>18</slash:comments> </item> <item><title>[MySQL] Deleting/Updating Rows Common To 2 Tables &#8211; Speed And Slave Lag Considerations</title><link>http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/</link> <comments>http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/#comments</comments> <pubDate>Mon, 11 May 2009 16:00:00 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[common]]></category> <category><![CDATA[deadlock]]></category> <category><![CDATA[delete]]></category> <category><![CDATA[lag]]></category> <category><![CDATA[lock]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[query]]></category> <category><![CDATA[replication]]></category> <category><![CDATA[row]]></category> <category><![CDATA[slave]]></category> <category><![CDATA[speed]]></category> <category><![CDATA[table]]></category> <category><![CDATA[update]]></category> <guid
isPermaLink="false">http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/</guid> <description><![CDATA[<h2>Introduction</h2><p>A question I recently saw on Stack Overflow titled <a
href="http://stackoverflow.com/questions/812512/faster-way-to-delete-matching-rows/" rel="nofollow">Faster way to delete matching [database] rows?</a> prompted me to organize my thoughts and observations on the subject and quickly jot them down here.</p><p>Here is the brief description of the task: say, you have 2 MySQL tables <em>a</em> and <em>b</em>. The tables contain the same type of data, for example log entries. Now you want to delete all or a subset of the entries in table <em>a</em> that exist in table <em>b</em>.</p><h2>Solutions Suggested By Others</h2><div
class="wp_syntax"><div
class="code"><pre>DELETE FROM a WHERE EXISTS (SELECT b.id FROM b WHERE b.id = a.id);</pre></div></div><div
class="wp_syntax"><div
class="code"><pre>DELETE a FROM a INNER JOIN b on a.id=b.id;</pre></div></div><div
class="wp_syntax"><div
class="code"><pre>DELETE FROM a WHERE id IN (SELECT id FROM </pre></div>...<div
class=clear></div> <a
href="http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></div>]]></description> <content:encoded><![CDATA[<h2>Introduction</h2><p>A question I recently saw on Stack Overflow titled <a
href="http://stackoverflow.com/questions/812512/faster-way-to-delete-matching-rows/" rel="nofollow">Faster way to delete matching [database] rows?</a> prompted me to organize my thoughts and observations on the subject and quickly jot them down here.</p><p>Here is the brief description of the task: say, you have 2 MySQL tables <em>a</em> and <em>b</em>. The tables contain the same type of data, for example log entries. Now you want to delete all or a subset of the entries in table <em>a</em> that exist in table <em>b</em>.</p><h2>Solutions Suggested By Others</h2><div
class="wp_syntax"><div
class="code"><pre>DELETE FROM a WHERE EXISTS (SELECT b.id FROM b WHERE b.id = a.id);</pre></div></div><div
class="wp_syntax"><div
class="code"><pre>DELETE a FROM a INNER JOIN b on a.id=b.id;</pre></div></div><div
class="wp_syntax"><div
class="code"><pre>DELETE FROM a WHERE id IN (SELECT id FROM b)</pre></div></div><h2>The Problem With Suggested Solutions</h2><p>Solutions above are all fine if the tables are quite small and the SELECT/JOIN is fast. However, in large scale situations with replication, these queries could potentially lock up the tables from writes and severely aggravate slave lag because, as I mentioned in the <a
href="http://beerpla.net/2008/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/">MySQL Slave Lag (Delay) Explained And 7 Ways To Battle It</a> post, replication is single-threaded.</p><p>Thus, if a single UPDATE/DELETE query takes a considerable amount of time, when it propagates to the slaves, they will be stuck executing it and doing nothing else, lagging behind more and more.</p><h2>My Thoughts And Solution</h2><p>I have personally dealt with having to delete many rows from one table that exist in another and in my experience it&#039;s best to do the following, especially if you expect lots of rows to be deleted. This technique most importantly will improve replication slave lag.</p><p>So, here it is: <strong>do a SELECT first, as a separate query</strong>, remembering the IDs returned in your script/application, then continue on deleting in batches (say, 50,000 rows at a time). This will achieve the following:</p><ul><li><em>each one of the delete statements will not lock the table for too long, thus not letting replication lag get out of control</em>. It is especially important if you rely on your replication to provide you relatively up-to-date data. The benefit of using batches is that if you find that each DELETE query still takes too long, you can adjust it to be smaller without touching any DB structures.</li><li>another benefit of using a separate SELECT is that <em>the SELECT itself might take a long time to run</em>, especially if it can&#039;t for whatever reason use the best DB indexes. If the SELECT is inner to a DELETE, when the whole statement migrates to the slaves, it will have to do the SELECT all over again, potentially lagging the slaves because of how long that SELECT will take. If you use a separate SELECT query, this problem goes away, as all you&#039;re passing to the DELETE query is a list of IDs.</li></ul><p>Do you have another opinion or see a fault with my logic? Feel free to share in the comments.</p><p>P.S. One thing to be careful about is, of course, potential edits to the table between the times the SELECT finishes and DELETEs start. I will let you handle such details by using transactions and/or logic pertinent to your application.</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=%5BMySQL%5D+Deleting%2FUpdating+Rows+Common+To+2+Tables+-+Speed+And+Slave+Lag+Considerations&amp;link=http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/&amp;notes=Introduction%20%20A%20question%20I%20recently%20saw%20on%20Stack%20Overflow%20titled%20Faster%20way%20to%20delete%20matching%20%5Bdatabase%5D%20rows%3F%20prompted%20me%20to%20organize%20my%20thoughts%20and%20observations%20on%20the%20subject%20and%20quickly%20jot%20them%20down%20here.%20%20Here%20is%20the%20brief%20description%20of%20the%20task%3A%20say%2C%20you%20have%202%20MySQL%20tables%20a%20and%20b.%20The%20ta&amp;short_link=http://bit.ly/atwEQy&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=%5BMySQL%5D+Deleting%2FUpdating+Rows+Common+To+2+Tables+-+Speed+And+Slave+Lag+Considerations&amp;link=http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/&amp;notes=Introduction%20%20A%20question%20I%20recently%20saw%20on%20Stack%20Overflow%20titled%20Faster%20way%20to%20delete%20matching%20%5Bdatabase%5D%20rows%3F%20prompted%20me%20to%20organize%20my%20thoughts%20and%20observations%20on%20the%20subject%20and%20quickly%20jot%20them%20down%20here.%20%20Here%20is%20the%20brief%20description%20of%20the%20task%3A%20say%2C%20you%20have%202%20MySQL%20tables%20a%20and%20b.%20The%20ta&amp;short_link=http://bit.ly/atwEQy&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=%5BMySQL%5D+Deleting%2FUpdating+Rows+Common+To+2+Tables+-+Speed+And+Slave+Lag+Considerations&amp;link=http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/&amp;notes=Introduction%20%20A%20question%20I%20recently%20saw%20on%20Stack%20Overflow%20titled%20Faster%20way%20to%20delete%20matching%20%5Bdatabase%5D%20rows%3F%20prompted%20me%20to%20organize%20my%20thoughts%20and%20observations%20on%20the%20subject%20and%20quickly%20jot%20them%20down%20here.%20%20Here%20is%20the%20brief%20description%20of%20the%20task%3A%20say%2C%20you%20have%202%20MySQL%20tables%20a%20and%20b.%20The%20ta&amp;short_link=http://bit.ly/atwEQy&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=%5BMySQL%5D+Deleting%2FUpdating+Rows+Common+To+2+Tables+-+Speed+And+Slave+Lag+Considerations&amp;link=http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/&amp;notes=Introduction%20%20A%20question%20I%20recently%20saw%20on%20Stack%20Overflow%20titled%20Faster%20way%20to%20delete%20matching%20%5Bdatabase%5D%20rows%3F%20prompted%20me%20to%20organize%20my%20thoughts%20and%20observations%20on%20the%20subject%20and%20quickly%20jot%20them%20down%20here.%20%20Here%20is%20the%20brief%20description%20of%20the%20task%3A%20say%2C%20you%20have%202%20MySQL%20tables%20a%20and%20b.%20The%20ta&amp;short_link=http://bit.ly/atwEQy&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=%5BMySQL%5D+Deleting%2FUpdating+Rows+Common+To+2+Tables+-+Speed+And+Slave+Lag+Considerations&amp;link=http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/&amp;notes=Introduction%20%20A%20question%20I%20recently%20saw%20on%20Stack%20Overflow%20titled%20Faster%20way%20to%20delete%20matching%20%5Bdatabase%5D%20rows%3F%20prompted%20me%20to%20organize%20my%20thoughts%20and%20observations%20on%20the%20subject%20and%20quickly%20jot%20them%20down%20here.%20%20Here%20is%20the%20brief%20description%20of%20the%20task%3A%20say%2C%20you%20have%202%20MySQL%20tables%20a%20and%20b.%20The%20ta&amp;short_link=http://bit.ly/atwEQy&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=%5BMySQL%5D+Deleting%2FUpdating+Rows+Common+To+2+Tables+-+Speed+And+Slave+Lag+Considerations&amp;link=http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/&amp;notes=Introduction%20%20A%20question%20I%20recently%20saw%20on%20Stack%20Overflow%20titled%20Faster%20way%20to%20delete%20matching%20%5Bdatabase%5D%20rows%3F%20prompted%20me%20to%20organize%20my%20thoughts%20and%20observations%20on%20the%20subject%20and%20quickly%20jot%20them%20down%20here.%20%20Here%20is%20the%20brief%20description%20of%20the%20task%3A%20say%2C%20you%20have%202%20MySQL%20tables%20a%20and%20b.%20The%20ta&amp;short_link=http://bit.ly/atwEQy&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=%5BMySQL%5D+Deleting%2FUpdating+Rows+Common+To+2+Tables+-+Speed+And+Slave+Lag+Considerations&amp;link=http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/&amp;notes=Introduction%20%20A%20question%20I%20recently%20saw%20on%20Stack%20Overflow%20titled%20Faster%20way%20to%20delete%20matching%20%5Bdatabase%5D%20rows%3F%20prompted%20me%20to%20organize%20my%20thoughts%20and%20observations%20on%20the%20subject%20and%20quickly%20jot%20them%20down%20here.%20%20Here%20is%20the%20brief%20description%20of%20the%20task%3A%20say%2C%20you%20have%202%20MySQL%20tables%20a%20and%20b.%20The%20ta&amp;short_link=http://bit.ly/atwEQy&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=%5BMySQL%5D%20Deleting%2FUpdating%20Rows%20Common%20To%202%20Tables%20-%20Speed%20And%20Slave%20Lag%20Considerations&amp;link=http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/&amp;notes=Introduction%20%20A%20question%20I%20recently%20saw%20on%20Stack%20Overflow%20titled%20Faster%20way%20to%20delete%20matching%20%5Bdatabase%5D%20rows%3F%20prompted%20me%20to%20organize%20my%20thoughts%20and%20observations%20on%20the%20subject%20and%20quickly%20jot%20them%20down%20here.%20%20Here%20is%20the%20brief%20description%20of%20the%20task%3A%20say%2C%20you%20have%202%20MySQL%20tables%20a%20and%20b.%20The%20ta&amp;short_link=http://bit.ly/atwEQy&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/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/" rel="bookmark" title="September 5, 2008">MySQL Slave Lag (Delay) Explained And 7 Ways To Battle It</a></li><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: EXPLAIN Demystified (Tuesday 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-portable-scale-out-benchmarks-for-mysql-wednesday-1050am/" rel="bookmark" title="April 16, 2008">MySQL Conference Liveblogging: Portable Scale-out Benchmarks For MySQL (Wednesday 10:50AM)</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%2F2009%2F05%2F11%2Fmysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations%2F&amp;title=%5BMySQL%5D%20Deleting%2FUpdating%20Rows%20Common%20To%202%20Tables%20%26%238211%3B%20Speed%20And%20Slave%20Lag%20Considerations" id="wpa2a_8"><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/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>MySQL Indexing Considerations Of Implementing A Priority Field In Your Application</title><link>http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/</link> <comments>http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/#comments</comments> <pubDate>Wed, 18 Mar 2009 14:00:00 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[asc]]></category> <category><![CDATA[desc]]></category> <category><![CDATA[how]]></category> <category><![CDATA[index]]></category> <category><![CDATA[order]]></category> <category><![CDATA[priority]]></category> <category><![CDATA[problem]]></category> <category><![CDATA[solution]]></category> <guid
isPermaLink="false">http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/</guid> <description><![CDATA[<h2>Introduction</h2><p>If you, like me, are building or thinking of implementing a MySQL-powered application that has any need for prioritizing selecting certain data over other data, this article is for you.</p><h2>Example</h2><p>As a real world example, consider a queue-like video processing system. Your application receives new videos and processes them. The volume of incoming videos can at times be higher than the processing rate because the process is CPU bound, so occasionally a pretty long queue may form. You will try to process them as fast as you can but…</p><p><div
class="note"><div
class="noteclassic">Note that I am using a queue here, so the <strong>the next item to be processed is a result of sorting by some sort of field in a <em>ascending </em></strong></div></div>...<div
class=clear></div> <a
href="http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<h2>Introduction</h2><p>If you, like me, are building or thinking of implementing a MySQL-powered application that has any need for prioritizing selecting certain data over other data, this article is for you.</p><h2>Example</h2><p>As a real world example, consider a queue-like video processing system. Your application receives new videos and processes them. The volume of incoming videos can at times be higher than the processing rate because the process is CPU bound, so occasionally a pretty long queue may form. You will try to process them as fast as you can but…</p><p><div
class="note"><div
class="noteclassic">Note that I am using a queue here, so the <strong>the next item to be processed is a result of sorting by some sort of field in a <em>ascending </em>order</strong>, for example ORDER BY id or ORDER BY upload_date. I’ll pick the id sort here.</div></div></p><p>…suddenly, you need to process a video somewhere in the middle of the queue or an important video enters and needs immediate attention. What do you do?</p><p>An obvious solution is implementing a simple priority system where each item has a numeric priority field. Now you can sort first by priority from highest to lowest and then by id within the highest priority. Important and urgent items get a their priority changed to something higher and get processed first. There is only one problem.</p><h2>Problem</h2><p>The problem is pretty serious – let’s take a look at the SELECT statement. Before selecting, I’ve added 19 random rows to have some data to work on.</p><div
class="wp_syntax"><div
class="code"><pre>SELECT * FROM queue ORDER BY priority DESC, id LIMIT 1;</pre></div></div><p>What kind of index would you put on this table to speed up this query? You do want to add a proper index, don’t you? DO YOU? Ok, good.</p><p>&nbsp;</p><p>Here’s what happens without any indexes:</p><div
class="wp_syntax"><div
class="code"><pre>mysql&gt; EXPLAIN SELECT * FROM queue ORDER BY priority DESC, id LIMIT 1;
+----+-------------+-------+------+---------------+------+---------+------+------+----------------+
| id | select_type | table | type | possible_keys | key  | key_len | ref  | rows | Extra          |
+----+-------------+-------+------+---------------+------+---------+------+------+----------------+
|  1 | SIMPLE      | queue | ALL  | NULL          | NULL | NULL    | NULL |   19 | Using filesort |
+----+-------------+-------+------+---------------+------+---------+------+------+----------------+
1 row in set (0.00 sec)</pre></div></div><p><em>Using filesort</em>, ugh, of course, due to sorting without an index.</p><p>&nbsp;</p><p>Let’s see, how about a combined index on (priority, id)?</p><div
class="wp_syntax"><div
class="code"><pre>mysql&gt; ALTER TABLE `queue` ADD INDEX `priority_id`(`priority`, `id`);
Query OK, 19 rows affected (0.05 sec)
Records: 19  Duplicates: 0  Warnings: 0
&nbsp;
mysql&gt; EXPLAIN SELECT * FROM queue ORDER BY priority DESC, id LIMIT 1;
+----+-------------+-------+-------+---------------+-------------+---------+------+------+-----------------------------+
| id | select_type | table | type  | possible_keys | key         | key_len | ref  | rows | Extra                       |
+----+-------------+-------+-------+---------------+-------------+---------+------+------+-----------------------------+
|  1 | SIMPLE      | queue | index | NULL          | priority_id | 5       | NULL |   19 | Using index; Using filesort |
+----+-------------+-------+-------+---------------+-------------+---------+------+------+-----------------------------+
1 row in set (0.00 sec)</pre></div></div><p>Better because an index is being used but not very good because filesort is still present. “Of course!”, you slap yourself on the forehead. The first ORDER BY uses a DESCENDING order, and our key is in ASCENDING order.</p><p>&nbsp;</p><p>So, let’s add the proper key with the right ordering instead.</p><div
class="wp_syntax"><div
class="code"><pre>mysql&gt; ALTER TABLE `queue` DROP INDEX `priority_id`;
Query OK, 19 rows affected (0.05 sec)
Records: 19  Duplicates: 0  Warnings: 0
&nbsp;
mysql&gt; ALTER TABLE `queue` ADD INDEX `priority_id`(`priority` DESC, `id`);
Query OK, 19 rows affected (0.06 sec)
Records: 19  Duplicates: 0  Warnings: 0</pre></div></div><div
class="wp_syntax"><div
class="code"><pre>mysql&gt; EXPLAIN SELECT * FROM queue ORDER BY priority DESC, id LIMIT 1;
+----+-------------+-------+-------+---------------+-------------+---------+------+------+-----------------------------+
| id | select_type | table | type  | possible_keys | key         | key_len | ref  | rows | Extra                       |
+----+-------------+-------+-------+---------------+-------------+---------+------+------+-----------------------------+
|  1 | SIMPLE      | queue | index | NULL          | priority_id | 5       | NULL |   19 | Using index; Using filesort |
+----+-------------+-------+-------+---------------+-------------+---------+------+------+-----------------------------+
1 row in set (0.00 sec)</pre></div></div><pre></pre><p>What the deuce? This is the same result as with the previous index. Time to dig up the documentation.</p><p>&nbsp;</p><p>Here is what the MySQL manual has to say under the <a
href="http://dev.mysql.com/doc/refman/5.1/en/order-by-optimization.html">ORDER BY optimization</a> section:</p><blockquote><p>MySQL <em>cannot</em> use indexes to resolve the ORDER BY, although it still uses indexes to find the rows that match the WHERE clause … if you mix ASC and DESC:</p></blockquote><blockquote><div
class="wp_syntax"><div
class="code"><pre>SELECT * FROM t1 ORDER BY key_part1 DESC, key_part2 ASC;</pre></div></div></blockquote><p>Moreover, to confuse the user even more, the index creation command accepts the DESC instruction, without actually honoring it, as specified in the <a
href="http://dev.mysql.com/doc/refman/5.1/en/create-index.html" rel="nofollow">CREATE INDEX</a> section:</p><blockquote><p>An <em>index_col_name</em> specification can end with ASC or DESC. These keywords are allowed for future extensions for specifying ascending or descending index value storage. Currently, they are parsed but ignored; index values are always stored in ascending order.</p></blockquote><p>So, after so many years MySQL still doesn’t support such basic functionality – you are either stuck with a query that uses filesort or have to look for a workaround.</p><h2>Solution</h2><p>Since it’s not possible to mix order directions, the solution is then to change the meaning of the priority column to match your needs. Thus, in the new approach priority 1 is higher than priority 10, and the application logic needs to accommodate to that. If you caught this while the application is still young, the code may be easy to change, but otherwise it could be a major pain in the butt.</p><h2>Conclusion</h2><p>The moral here is: plan your queries ahead and don’t mix and match DESC and ASC ordering as MySQL will not be able to use an index to resolve it. Do it even sooner if you’re putting lots and lots of data into your tables.</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Indexing+Considerations+Of+Implementing+A+Priority+Field+In+Your+Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&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+Indexing+Considerations+Of+Implementing+A+Priority+Field+In+Your+Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&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+Indexing+Considerations+Of+Implementing+A+Priority+Field+In+Your+Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&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+Indexing+Considerations+Of+Implementing+A+Priority+Field+In+Your+Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&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+Indexing+Considerations+Of+Implementing+A+Priority+Field+In+Your+Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&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+Indexing+Considerations+Of+Implementing+A+Priority+Field+In+Your+Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&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+Indexing+Considerations+Of+Implementing+A+Priority+Field+In+Your+Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&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%20Indexing%20Considerations%20Of%20Implementing%20A%20Priority%20Field%20In%20Your%20Application&amp;link=http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/&amp;notes=Introduction%20If%20you%2C%20like%20me%2C%20are%20building%20or%20thinking%20of%20implementing%20a%20MySQL-powered%20application%20that%20has%20any%20need%20for%20prioritizing%20selecting%20certain%20data%20over%20other%20data%2C%20this%20article%20is%20for%20you.%20Example%20As%20a%20real%20world%20example%2C%20consider%20a%20queue-like%20video%20processing%20system.%20Your%20application%20rece&amp;short_link=http://bit.ly/csuKMb&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/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: EXPLAIN Demystified (Tuesday 2:00PM)</a></li><li><a
href="http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/" rel="bookmark" title="February 17, 2009">Swapping Column Values in MySQL</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><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-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/" rel="bookmark" title="April 17, 2008">MySQL Conference Liveblogging: Optimizing MySQL For High Volume Data Logging Applications (Thursday 2:50PM)</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%2F2009%2F03%2F18%2Fmysql-indexing-considerations-of-implementing-a-priority-field-in-your-application%2F&amp;title=MySQL%20Indexing%20Considerations%20Of%20Implementing%20A%20Priority%20Field%20In%20Your%20Application" id="wpa2a_10"><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/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Swapping Column Values in MySQL</title><link>http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/</link> <comments>http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/#comments</comments> <pubDate>Wed, 18 Feb 2009 00:53:47 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[column]]></category> <category><![CDATA[database]]></category> <category><![CDATA[swap]]></category> <category><![CDATA[value]]></category> <guid
isPermaLink="false">http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/</guid> <description><![CDATA[<p>Today I had to swap 2 columns in one of my MySQL tables. The task, which seems easily accomplishable by a temp variable, proved to be a bit harder to complete. But only just a bit.</p><p>Here are my findings:</p><ol><li><p>The</p><div
class="wp_syntax"><div
class="code"><pre>UPDATE swap_test SET x=y, y=x;</pre></div></div><p>approach doesn&#039;t work, as it&#039;ll just set both values to y.</p><p><div
class="note"><div
class="notetip">PostgreSQL seems to handle this query differently, as it apparently uses the old values throughout the whole query. [<a
href="http://www.postgresql.org/docs/8.3/static/sql-update.html">Reference</a>]</div></div></p></li><li><p>Here&#039;s a method that uses a temporary variable. Thanks to Antony from the comments for the &#34;IS NOT NULL&#34; tweak. Without it, the query works unpredictably. See the table schema at the end of the post. This method doesn&#039;t swap the values</p></li>...<div
class=clear></div> <a
href="http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ol>]]></description> <content:encoded><![CDATA[<p>Today I had to swap 2 columns in one of my MySQL tables. The task, which seems easily accomplishable by a temp variable, proved to be a bit harder to complete. But only just a bit.</p><p>Here are my findings:</p><ol><li><p>The</p><div
class="wp_syntax"><div
class="code"><pre>UPDATE swap_test SET x=y, y=x;</pre></div></div><p>approach doesn&#039;t work, as it&#039;ll just set both values to y.</p><p><div
class="note"><div
class="notetip">PostgreSQL seems to handle this query differently, as it apparently uses the old values throughout the whole query. [<a
href="http://www.postgresql.org/docs/8.3/static/sql-update.html">Reference</a>]</div></div></p></li><li><p>Here&#039;s a method that uses a temporary variable. Thanks to Antony from the comments for the &quot;IS NOT NULL&quot; tweak. Without it, the query works unpredictably. See the table schema at the end of the post. This method doesn&#039;t swap the values if one of them is NULL. Use method #3 that doesn&#039;t have this limitation.</p><div
class="wp_syntax"><div
class="code"><pre>UPDATE swap_test SET x=y, y=@temp WHERE (@temp:=x) IS NOT NULL;</pre></div></div><p><div
class="note"><div
class="notewarning">The parentheses around @temp:=x are critical. Omitting them will cause data corruption.</div></div></p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
</pre></td><td
class="code"><pre>mysql&amp;gt; UPDATE swap_test SET x=y, y=@temp WHERE (@temp:=x) IS NOT NULL;
Query OK, 3 rows affected
Rows matched: 3  Changed: 3  Warnings: 0</pre></td></tr></table></div></li><li><p>This method was offered by Dipin in the comments. I think it’s the most elegant and clean solution. It works with both NULL and non-NULL values.</p><div
class="wp_syntax"><div
class="code"><pre>UPDATE swap_test SET x=(@temp:=x), x = y, y = @temp;</pre></div></div></li><li><p>Another approach I came up with that seems to work:</p><div
class="wp_syntax"><div
class="code"><pre>UPDATE swaptest s1, swaptest s2 SET s1.x=s1.y, s1.y=s2.x WHERE s1.id=s2.id;</pre></div></div><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
</pre></td><td
class="code"><pre>mysql&amp;gt; update swap_test s1, swap_test s2 set s1.x=s1.y, s1.y=s2.x where s1.id=s2.id;
Query OK, 3 rows affected
Rows matched: 3  Changed: 3  Warnings: 0</pre></td></tr></table></div></li></ol><p>Essentially, the 1st table is the one getting updated and the 2nd one is used to pull the old data from.<div
class="note"><div
class="noteclassic">Note that this approach requires a primary key to be present.</div></div></p><p>Test schema used:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td
class="code"><pre>CREATE TABLE `swap_test` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `x` varchar(255) DEFAULT NULL,
  `y` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;
&nbsp;
INSERT INTO `swap_test` VALUES ('1', 'a', '10');
INSERT INTO `swap_test` VALUES ('2', NULL, '20');
INSERT INTO `swap_test` VALUES ('3', 'c', NULL);</pre></td></tr></table></div><p>Do you have a better approach? If so, please share in the comments.</p><p>Some references:</p><ul><li><a
title="http://stackoverflow.com/questions/37649/swapping-column-values-in-mysql/" href="http://stackoverflow.com/questions/37649/swapping-column-values-in-mysql/">http://stackoverflow.com/questions/37649/swapping-column-values-in-mysql/</a> – some discussion on various methods, which eventually prompted me to start this post</li><li><a
title="http://www.marcworrell.com/article-3026-en.html" href="http://www.marcworrell.com/article-3026-en.html">http://www.marcworrell.com/article-3026-en.html</a> – discussion on the 2nd approach, which doesn’t work</li></ul><div
class='post_blob_1'>Pass your <a
href="http://www.test-king.com/exams/642-524.htm">642-524</a> exam with highest score using latest <a
href="http://www.test-king.com/exams/642-373.htm">642-373</a> practice questions and <a
href="http://www.test-king.com/exams/642-446.htm">642-446</a> sample exams.</div><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Swapping+Column+Values+in+MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&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=Swapping+Column+Values+in+MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&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=Swapping+Column+Values+in+MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&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=Swapping+Column+Values+in+MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&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=Swapping+Column+Values+in+MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&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=Swapping+Column+Values+in+MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&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=Swapping+Column+Values+in+MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&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=Swapping%20Column%20Values%20in%20MySQL&amp;link=http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/&amp;notes=Today%20I%20had%20to%20swap%202%20columns%20in%20one%20of%20my%20MySQL%20tables.%20The%20task%2C%20which%20seems%20easily%20accomplishable%20by%20a%20temp%20variable%2C%20proved%20to%20be%20a%20bit%20harder%20to%20complete.%20But%20only%20just%20a%20bit.%0D%0AHere%20are%20my%20findings%3A%0D%0A%0D%0A%0D%0AThe%0D%0AUPDATE%20swap_test%20SET%20x%3Dy%2C%20y%3Dx%3Bapproach%20doesn%27t%20work%2C%20as%20it%27ll%20just%20set%20both%20values%20to%20&amp;short_link=http://bit.ly/9F5oZC&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/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/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/" rel="bookmark" title="April 17, 2008">MySQL Conference Liveblogging: Optimizing MySQL For High Volume Data Logging Applications (Thursday 2:50PM)</a></li><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: EXPLAIN Demystified (Tuesday 2:00PM)</a></li><li><a
href="http://beerpla.net/2010/03/21/how-to-diagnose-and-fix-incorrect-post-comment-counts-in-wordpress/" rel="bookmark" title="March 21, 2010">How To Diagnose And Fix Incorrect Post Comment Counts In WordPress</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%2F2009%2F02%2F17%2Fswapping-column-values-in-mysql%2F&amp;title=Swapping%20Column%20Values%20in%20MySQL" id="wpa2a_12"><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/2009/02/17/swapping-column-values-in-mysql/feed/</wfw:commentRss> <slash:comments>27</slash:comments> </item> <item><title>Artem&#8217;s Top 10 Tech Predictions And Ideas For 2009 And Beyond</title><link>http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/</link> <comments>http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/#comments</comments> <pubDate>Sat, 10 Jan 2009 08:05:39 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Awesomeness]]></category> <category><![CDATA[Databases]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Stuff]]></category> <category><![CDATA[Technology]]></category> <category><![CDATA[2009]]></category> <category><![CDATA[2010]]></category> <category><![CDATA[geek]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[predictions]]></category> <category><![CDATA[tech]]></category> <category><![CDATA[twitter]]></category> <category><![CDATA[youtube]]></category> <guid
isPermaLink="false">http://beerpla.net/?p=699</guid> <description><![CDATA[<p><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="105" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_8.png" width="115" align="left" />Everyone and their mother are throwing out their predictions for 2009 nowadays, it’s a new fad. It’s like you’re not cool anymore if you don’t have twitter, a Mac, and a set of random predictions for the next 12 joyous months.</p><p>So I decided to throw in a few ideas of my own to be part of the cool crowd again (how much cooler can I be already, you might think, and I wouldn’t blame you).</p><p>&#160;</p><h3 align="center"><strong></strong></h3><h2 align="center"><strong>Disclaimer (read it, tough guy)</strong></h2><p>What this post is:</p><ul><li>about the future of technology and the Internet, 2009 and beyond.</li><li><strong><u>my</u></strong> ideas on what is going to happen or should happen. If they happen to match someone else’s ideas – it doesn’t mean</li>...<div
class=clear></div> <a
href="http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ul>]]></description> <content:encoded><![CDATA[</p><p><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="105" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_8.png" width="115" align="left" />Everyone and their mother are throwing out their predictions for 2009 nowadays, it’s a new fad. It’s like you’re not cool anymore if you don’t have twitter, a Mac, and a set of random predictions for the next 12 joyous months.</p><p>So I decided to throw in a few ideas of my own to be part of the cool crowd again (how much cooler can I be already, you might think, and I wouldn’t blame you).</p><p>&#160;</p><h3 align="center"><strong></strong></h3><h2 align="center"><strong>Disclaimer (read it, tough guy)</strong></h2><p>What this post is:</p><ul><li>about the future of technology and the Internet, 2009 and beyond.</li><li><strong><u>my</u></strong> ideas on what is going to happen or should happen. If they happen to match someone else’s ideas – it doesn’t mean I ripped them off, it just means we share the same opinions and they’re more likely to come true.</li><li>awesome.</li></ul><p>What this post is not:</p><ul><li>predictions I pulled out of my ass, like “the market will bounce in August 2009” because some random douche said so.</li><li>a collection of stolen ideas. I have reserved a separate post for that purpose.</li><li><a
href="http://xkcd.com/526/">a raptor on hoverboard</a>.</li></ul><p>&#160;</p><h2 align="center"><strong>Things That Need To Happen</strong></h2><p><strong><font
size="4">1. Socially Editable Maps</font></strong></p><p><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="150" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb.png" width="150" align="left" /></a>With the advent of the GPS technology in the last couple of years and GPS prices falling (my originally $800 <a
href="http://www.amazon.com/dp/B000H49LXQ/?tag=beepla-20">Garmin Nuvi 660</a> now costs about $200), the biggest frustration I have now is the accuracy of information. In the world of Google Maps and Wikipedia, why is it that I have to wait a whole year for map updates that are obsolete by the time they come out? The Bay Bridge repairs change the roads on an almost monthly basis, for example.</p><p><strong>I want to know about road changes as soon as they occur.</strong></p><p>The next big thing will be a company, either existing, like Google, or a startup, that will introduce the social aspect into the mapping technology. It will do for maps and GPS what Wikipedia did for text, using the same approach. The details are of course to be worked out.</p><p>After this concept becomes successful, GPS companies, will need to support such updates over the air, with a push of a button. This ties in closely with prediction #2 and #4.</p><p>&#160;</p><p><font
size="4"><strong>2. Open Source GPS Goes Mainstream</strong></font></p><p><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_9.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="150" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_6.png" width="150" align="left" /></a>Google, the father of Android, needs to get behind this one as well. In fact, an open source GPS device would really be a subset of Android’s functionality, in a dedicated device, so it shouldn’t be that hard. In the far future, it will be built into automobile dashboards but I don’t foresee that happening in the near future.</p><p>Combined with prediction #1, this will be a killer device. I really believe that free, open source software is the wave of the future, the natural direction of where software development is heading. Look at Linux in the past few years. Look at Android now. Release one and I’m be #1 in line for one. Those who know me IRL know that I can’t go anywhere without a GPS anymore. I once forgot a GPS at home and ended up in Chili.</p><p>&#160;</p><p><strong><font
size="4">3. Photo and Video Cameras Will Go Wireless, Anywhere You Go</font></strong></p><p><a
href="http://www.amazon.com/dp/B000B8UOV6/?tag=beepla-20"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="112" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_4.png" width="150" align="left" /></a>Photo and video cameras will be able to post pictures and videos to your home computer, sites like Flickr and YouTube, or email themselves directly to your friends… as soon as you record them, over cellular and Wifi networks.</p><p>Cell phones with cameras? Think cameras with cell phones. Some Wifi enabled cameras already came out, like this <a
href="http://www.amazon.com/dp/B000B8UOV6/?tag=beepla-20">Canon SD430</a> (DP review <a
href="http://www.dpreview.com/news/0510/05102501canonsd430wifi.asp">here</a>), and this freshly announced at CES 2009 <a
href="http://i.gizmodo.com/5126097/sony-cybershot-g3-worlds-first-camera-you-can-surf-the-web-on">Sony G3</a>, and now it’s time to go cellular.</p><p>The next prediction is a generalization of this concept.</p><p>&#160;</p><p><strong><font
size="4">4. Wireless Connectivity Everywhere, In Every Device, Anywhere You Go</font></strong></p><p><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_5.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="101" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_4.png" width="150" align="left" /></a>Cell phone carriers will sign an increasing amount of deals with companies that want to build devices which connect to the Internet or private networks anywhere you go: GPSes, cameras, digital picture frames, cars, fridges.</p><p>The future is completely wireless. People are sick and tired of cords, clutter, and Rick Astley – I know that for a fact and digg says so.</p><p>&#160;</p><p><strong><font
size="4">5. Android Will Become Hugely Successful</font></strong></p><p><strong><font
size="4"><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_6.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="150" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_5.png" width="150" align="left" /></a></font></strong>Alright, I’m dead tired of <a
href="http://www.google.com/search?q=android+flop&amp;sourceid=navclient-ff&amp;ie=UTF-8&amp;rlz=1B3GGGL_en___US269">all the posts</a> about how <a
href="http://www.android.com/">Google’s Android</a> is going to <strong>flop</strong> in 2009. I sincerely feel that people with that point of view have never experienced Google and open source, played with Android itself, or realized what exactly an open source phone OS means to developers, manufacturers, and consumers.</p><p>Android will become a platform of choice in the next couple of years as everyone starts to realize its limitless possibilities, the OS matures, thousands of new apps get written for it, and new Android phones flood the market. The only Android phone released so far, HTC’s G1, has already <a
href="http://reviews.cnet.com/smartphones/t-mobile-g1-black/4505-6452_7-33283585.html">received praise from consumers</a>, as well as my friends (even the females ones are excited. And yes, I have female friends).</p><p>Motorola <a
href="http://www.redherring.com/Home/25383">announced</a> a few months ago that its new phones are going to run Android and Windows Mobile exclusively. If a company with an R&amp;D department as big as Moto’s stands behind something, you bet your ass they’ve done they’re homework. And what’s not to like? They can now:</p><ul><li>take something that’s supported by the biggest Internet company in the world and the community, for free.</li><li>stop worrying about writing and maintaining their own OS – BAM, tons of money saved.</li><li>concentrate R&amp;D on the hardware.</li><li>if need be, freely develop the features they want that Android doesn’t support yet and contribute them back. Everyone wins, except maybe Symbian developers that don’t have a job anymore.</li></ul><p>Android is going to be a revolution. Apple and Android fighting it out will be the best thing that happened to us since the invention of sushi.</p><p><div
class="note"><div
class="notetip"><strong>Update:</strong> An <a
href="http://www.intomobile.com/2009/01/09/ces-2009-nimble-android-desktop-phone.html">Android desktop phone</a> was just released at CES. By end of 2009 we will be flooded with Androidness.</div></div></p><p>&#160;</p><p><strong><font
size="4">6. Open Source HDTVs</font></strong></p><p><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_11.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="109" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_8.png" width="150" align="left" /></a> The open source revolution will continue and start penetrating the HDTV market.</p><p>Personally, I think set top boxes are a waste of effort, time, and money but give me an HDTV that can run Youtube, Vimeo, LastFM, Pandora, and any other site through some sort of a plugin or browser, with a build in Media Center that connects to my computers and goes Wifi, that uses open source, upgradeable software (most likely Linux based), and I will buy it in a heartbeat.</p><p>Yes, what I’m saying is if my TV and HTPC did something dirty, I would totally dig their offspring, and so would millions of other people who don’t want/need/care/understand HTPC. TV in general holds a special place in my heart, and make it an even better experience, people.</p><p><div
class="note"><div
class="notetip"><strong>Update: </strong>In fact, Vizio just made <a
href="http://www.engadget.com/2009/01/07/vizio-takes-the-cover-off-connected-hdtv-netflix-blockbuster/">an announcement</a> at CES 2009 that their TVs will have built-in support for <a
href="http://www.engadgethd.com/2009/01/07/vizio-connected-hdtv-directly-streams-netflix-movies/">Netflix</a>, Blockbuster, Amazon, Yahoo, and more.</div></div></p><p>&#160;</p><p><strong><font
size="4">7. Twitter’s Popularity Will Explode</font></strong></p><p><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_10.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="119" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_7.png" width="150" align="left" /></a>Now for some social media. Twitter will continue dominating the microblogging arena, similar to YouTube dominating the video space. The site will grow extremely fast, much faster than now.</p><p>Competitors, like <a
href="http://plurk.com/ArtemR">plurk</a>, will probably secure certain small niches but nobody will be close to touch twitter.</p><p><div
class="note"><div
class="notetip">Twitter’s Google PageRank (PR) today is <strong>8</strong> out of <strong>10</strong>, which is considered very high.</p><p>It has the Alexa 3 month average rank of <strong>599</strong>, 1 week average of <strong>414</strong>, and 1 day average of <strong>351</strong>.</p><p><em>I predict that by the end of <strong>2009</strong>, Twitter will move into the <strong>top 50 </strong>Alexa.</em></div></div></p><p>Twitter’s significance in the business world for will be revolutionary. It will become second nature for every company to have one or many twitter accounts as means of connecting to consumers on a personal level. Think an opportunity for mini press releases, many of them, daily, not boring ones, the ones people are actually going to read.</p><p><div
class="note"><div
class="noteclassic">Twitter is already being used by some companies, like Comcast (<a
href="http://twitter.com/comcastcares">@comcastcares</a>), for monitoring and responding to customer comments.</div></div></p><p>&#160;</p><p><strong><font
size="4">8. Social Media Jobs Will Be In Increasing Demand</font></strong></p><p> <a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_12.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="115" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_9.png" width="150" align="left" /></a> SEO, social marketing, and viral campaigns are very cost effective ways of brand promotion, and every company will want to jump on board.<p>As more and more of them realize this, they will start needing more people with marketing skills of <a
href="http://www.johnchow.com">John Chow</a>, <a
href="http://www.chrisbrogan.com/">Chris Brogan</a>, <a
href="http://www.nickycakes.com">Nicky Cakes</a> (this dude is hilarious), <a
href="http://www.shoemoney.com/">Jeremy Schoemaker</a>, and the like.</p><p>&#160;</p><p><strong><font
size="4">9. YouTube Will Continue To Dominate</font></strong></p><p><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_13.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 20px 10px 0px" height="112" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_10.png" width="150" align="left" /></a> This one is easy:</p><ul><li>Biggest user base.</li><li>HD. My favorite greasemonkey plugin <a
href="http://userscripts.org/scripts/show/13333">YousableTubeFix</a> exposes hi/lo FLVs, MP4, and HD MP4 options. Better quality equals better user experience.</li><li>Chromeless player. YouTube is the only company I know of that has a Javascript controlled chromeless player, which can be embedded in any other flash player. Combined with already existing millions of embeds all over the Internet, YouTube’s popularity isn’t going anywhere any time soon.</li><li>Google backed. Anything is possible when you Google owns you. Competition releases a good feature? YouTube has the resources to one-up it in no time. Need for more servers? YouTube will just buy a few thousand more with the $1.65Bln Google gave it. Traffic explosion? No problem &#8211; YouTube has been mooching off the Google CDN for months now.</li></ul><p>At the end of 2007, I predicted that in a year we will experience unprecedented HD quality online video. This prediction came true when <a
href="http://www.hulu.com">Hulu</a> and fueled by its success CBS, ABC, NBC, and pretty much every other TV network released their free online TV sites. YouTube <a
href="http://news.cnet.com/8301-1023_3-10126837-93.html">launched HD</a> a few months later.</p><p>So, my YouTube prediction for 2009 is it will sign deals with major TV and movie networks to finally start showing legal TV episodes and movies. It will become the biggest legal TV and movie hub on the Internet.</p><p>&#160;</p><p><strong><font
size="4">10. PostgreSQL Will Gain Popularity</font></strong></p><p><a
href="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_14.png" class="lightview" rel="gallery['699']" title="image"><img
title="image" style="display: inline; margin: 0px 20px 10px 0px" height="119" alt="image" src="http://beerpla.net/wp-content/uploads/TechIdeasPredictions_B3A8/image_thumb_11.png" width="150" align="left" /></a> Sun’s buyout of MySQL in 2008 surely sent some shockwaves around. However, I predict that the following factors will contribute to <a
href="http://www.postgresql.org/">PostgreSQL</a> gaining momentum:</p><ul><li>certain features of MySQL were moved to Enterprise only. Open source enthusiasts don’t appreciate an open source project going partially closed source, so they will be looking for alternative software, like PostgreSQL.</li><li>having spent years with MySQL, I am incredibly frustrated with certain quirks that should have been worked out a long time ago. As software architects look for stable, mature, cost effective, and easy to maintain databases, they will find PostgreSQL increasingly attractive.</li></ul><p>Don’t take my word for it. I highly suggest taking a look at <a
href="http://downloads.enterprisedb.com/whitepapers/PGvsMySQL_LowRes.pdf">this whitepaper comparing MySQL and PostgreSQL</a>. here are some highlights:</p><ul><li>Online operations and reorganization. This is my biggest beef with MySQL. Almost any ALTER table command will prevent writes to the table while it’s being altered. This operation requires double the table size because an ALTER simply makes a copy of the table, a rename, and then drop of the old one. This takes FOREVERRRR. PostgreSQL, on the other hand, supports <a
href="http://www.postgresql.org/docs/8.0/interactive/sql-altertable.html">a lot more</a> online operations that will not take down the table. MySQL promised to support <a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-the-future-of-mysql-tuesday-1155am-2/">online ALTER TABLE by 2009</a>. Will they keep their word? I highly doubt it.</li><li>PostgreSQL supports function based and partial indexes.</li><li>PostgreSQL supports nested triggers.</li><li>PostgreSQL supports user defined datatypes.</li><li>PostgreSQL has an IP address datatype (woot!).</li><li>MySQL’s default engine doesn’t support online backup and recovery (*cough*, MyISAM, *cough*). Don’t even get me started on MyISAM, which doesn’t support referential integrity, transactions, of any other ACID properties. Yes, I know, there&#039;s InnoDB. It’s a lot better. But it’s still not good enough.</li></ul><p>If you have spent time interfacing with both MySQL and PostgreSQL, I’d like to hear from you. Everyone I talked to so far who had used both, preferred PostgreSQL.</p><p>For all the MySQL fanboys, I was and still am one of you, I use MySQL every day. I’m only trying to open your eyes so you can see the rest of the world.</p><p><div
class="note"><div
class="noteclassic">Did you know PostgreSQL was a lot more mature than MySQL? Postgres <a
href="http://www.postgresql.org/about/history">was started in 1986</a> (or 1977 if you count its predecessor Ingres), while MySQL was initially released in 1995.</div></div></p><p>In fact, I think the only reason MySQL is so much more popular than Postgresql nowadays is luck and marketing by MySQL AB (hey, it sure paid off, I’m not saying anything).</p><p>So, here’s to PostgreSQL having a bright future.</p><p>&#160;</p></p></p><h2 align="center"><strong>Bonus</strong></h2><p>As a bonus, here is a collection of links to other interesting predictions for 2009:</p><ul><li><a
title="http://www.pr-squared.com/2008/12/social_media_predictions_2009.html" href="http://www.pr-squared.com/2008/12/social_media_predictions_2009.html">http://www.pr-squared.com/2008/12/social_media_predictions_2009.html</a> – a great list of social media predictions.</li><li><a
title="http://battellemedia.com/archives/004772.php" href="http://battellemedia.com/archives/004772.php">http://battellemedia.com/archives/004772.php</a> – 14 online predictions as well as analysis of past years’ predictions.</li><li><a
title="http://news.cnet.com/5-predictions-for-2009/" href="http://news.cnet.com/5-predictions-for-2009/">http://news.cnet.com/5-predictions-for-2009/</a> – 5 CNET Digital Home predictions.</li><li><a
title="http://www.engadget.com/2009/01/01/predictions-for-2009/" href="http://www.engadget.com/2009/01/01/predictions-for-2009/">http://www.engadget.com/2009/01/01/predictions-for-2009/</a> – Engadget’s predictions.</li><li><a
title="http://www.freedom-to-tinker.com/blog/felten/predictions-2009" href="http://www.freedom-to-tinker.com/blog/felten/predictions-2009">http://www.freedom-to-tinker.com/blog/felten/predictions-2009</a> – 38 predictions freedom and technology related predictions.</li><li><a
title="http://www.readwriteweb.com/archives/2009_predictions_across_the_we.php" href="http://www.readwriteweb.com/archives/2009_predictions_across_the_we.php">http://www.readwriteweb.com/archives/2009_predictions_across_the_we.php</a> – ReadWriteWeb’s predictions across the web.</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=Artem%26rsquo%3Bs+Top+10+Tech+Predictions+And+Ideas+For+2009+And+Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&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=Artem%26rsquo%3Bs+Top+10+Tech+Predictions+And+Ideas+For+2009+And+Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&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=Artem%26rsquo%3Bs+Top+10+Tech+Predictions+And+Ideas+For+2009+And+Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&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=Artem%26rsquo%3Bs+Top+10+Tech+Predictions+And+Ideas+For+2009+And+Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&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=Artem%26rsquo%3Bs+Top+10+Tech+Predictions+And+Ideas+For+2009+And+Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&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=Artem%26rsquo%3Bs+Top+10+Tech+Predictions+And+Ideas+For+2009+And+Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&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=Artem%26rsquo%3Bs+Top+10+Tech+Predictions+And+Ideas+For+2009+And+Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&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=Artem%26rsquo%3Bs%20Top%2010%20Tech%20Predictions%20And%20Ideas%20For%202009%20And%20Beyond&amp;link=http://beerpla.net/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/&amp;notes=%20%20%20%20Everyone%20and%20their%20mother%20are%20throwing%20out%20their%20predictions%20for%202009%20nowadays%2C%20it%E2%80%99s%20a%20new%20fad.%20It%E2%80%99s%20like%20you%E2%80%99re%20not%20cool%20anymore%20if%20you%20don%E2%80%99t%20have%20twitter%2C%20a%20Mac%2C%20and%20a%20set%20of%20random%20predictions%20for%20the%20next%2012%20joyous%20months.%20%20So%20I%20decided%20to%20throw%20in%20a%20few%20ideas%20of%20my%20own%20to%20be%20part%20of&amp;short_link=http://bit.ly/9Xlipo&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/2009/09/03/htc-hero-coming-to-sprint-october-11th-179-99-powerful-and-sexy-here-is-why-you-need-to-own-it/" rel="bookmark" title="September 3, 2009">HTC Hero Coming To Sprint October 11th! $179.99, Powerful, And Sexy. Here Is Why You Need To Own It</a></li><li><a
href="http://beerpla.net/2008/04/21/sun-definitely-developing-a-phone/" rel="bookmark" title="April 21, 2008">Sun Definitely Developing A Phone This Year</a></li><li><a
href="http://beerpla.net/2009/04/09/the-real-reasons-to-use-twitter-get-over-your-prejudice-already/" rel="bookmark" title="April 9, 2009">The Real Reasons To Use Twitter (Get Over Your Prejudice Already)</a></li><li><a
href="http://beerpla.net/2010/01/18/wordpress-developers-how-do-you-make-a-living-poll-discussion/" rel="bookmark" title="January 18, 2010">WordPress Developers &#8211; How Do You Make A Living [Poll + Discussion]?</a></li><li><a
href="http://beerpla.net/2009/11/21/meet-firefox-for-mobile-video-feature-highlights-more-info/" rel="bookmark" title="November 21, 2009">Meet Firefox For Mobile [Video + Feature Highlights + More Info]</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%2F2009%2F01%2F10%2Fartems-top-10-tech-predictions-and-ideas-for-2009-and-beyond%2F&amp;title=Artem%26rsquo%3Bs%20Top%2010%20Tech%20Predictions%20And%20Ideas%20For%202009%20And%20Beyond" id="wpa2a_14"><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/2009/01/10/artems-top-10-tech-predictions-and-ideas-for-2009-and-beyond/feed/</wfw:commentRss> <slash:comments>17</slash:comments> </item> <item><title>Hadoop Primer &#8211; Yet Another Hadoop Introduction</title><link>http://beerpla.net/2008/10/20/hadoop-primer-yet-another-hadoop-introduction/</link> <comments>http://beerpla.net/2008/10/20/hadoop-primer-yet-another-hadoop-introduction/#comments</comments> <pubDate>Tue, 21 Oct 2008 06:48:38 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[hadoop]]></category> <category><![CDATA[install]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[scaling]]></category> <category><![CDATA[start]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/10/20/hadoop-primer-yet-another-hadoop-introduction/</guid> <description><![CDATA[<p><a
href="http://beerpla.net/wp-content/uploads/HadoopPrimerYetAnotherHadoopIntroduction_14EC8/image.png" class="lightview" rel="gallery['469']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="71" alt="image" src="http://beerpla.net/wp-content/uploads/HadoopPrimerYetAnotherHadoopIntroduction_14EC8/image_thumb.png" width="300" align="left" /></a> I just came upon a <a
href="http://wikis.sun.com/download/attachments/38208497/Hadoop-Primer.pdf">pretty good Hadoop introduction paper</a> posted on Sun’s wiki. <b><a
href="http://hadoop.apache.org/core/">Apache Hadoop</a></b> is a free Java software framework that supports data intensive distributed applications. It enables applications to work with thousands of nodes and petabytes of data. Hadoop was inspired by Google&#039;s <a
href="http://en.wikipedia.org/wiki/MapReduce">MapReduce</a> and <a
href="http://en.wikipedia.org/wiki/GoogleFS">Google File System</a> (GFS) (<a
href="http://en.wikipedia.org/wiki/Hadoop">wikipedia</a>). I wouldn’t call it an alternative to mysql &#8211; they’re in completely different weight categories. I like to think of Hadoop as a complement &#8211; I think it’s closer to memcached in its functions than to mysql. Perhaps a hybrid of both but a unique beast nonetheless. If you’re serious about scaling, you owe it to yourself to start exploring Hadoop yesterday.</p><p>A couple of ...<div
class=clear></div> <a
href="http://beerpla.net/2008/10/20/hadoop-primer-yet-another-hadoop-introduction/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p><a
href="http://beerpla.net/wp-content/uploads/HadoopPrimerYetAnotherHadoopIntroduction_14EC8/image.png" class="lightview" rel="gallery['469']" title="image"><img
title="image" style="display: inline; margin: 0px 10px 10px 0px" height="71" alt="image" src="http://beerpla.net/wp-content/uploads/HadoopPrimerYetAnotherHadoopIntroduction_14EC8/image_thumb.png" width="300" align="left" /></a> I just came upon a <a
href="http://wikis.sun.com/download/attachments/38208497/Hadoop-Primer.pdf">pretty good Hadoop introduction paper</a> posted on Sun’s wiki. <b><a
href="http://hadoop.apache.org/core/">Apache Hadoop</a></b> is a free Java software framework that supports data intensive distributed applications. It enables applications to work with thousands of nodes and petabytes of data. Hadoop was inspired by Google&#039;s <a
href="http://en.wikipedia.org/wiki/MapReduce">MapReduce</a> and <a
href="http://en.wikipedia.org/wiki/GoogleFS">Google File System</a> (GFS) (<a
href="http://en.wikipedia.org/wiki/Hadoop">wikipedia</a>). I wouldn’t call it an alternative to mysql &#8211; they’re in completely different weight categories. I like to think of Hadoop as a complement &#8211; I think it’s closer to memcached in its functions than to mysql. Perhaps a hybrid of both but a unique beast nonetheless. If you’re serious about scaling, you owe it to yourself to start exploring Hadoop yesterday.</p><p>A couple of reasons for sharing the primer:</p><ul><li>it is short and concise</li><li>it has examples</li><li>and most importantly, it finally pushed me to install Hadoop on a 4-machine cluster and start playing around with it</li></ul><p>So, take a look at the <a
href="http://wikis.sun.com/download/attachments/38208497/Hadoop-Primer.pdf">primer PDF</a>, <a
href="http://www.apache.org/dyn/closer.cgi/hadoop/core/">download</a> Hadoop, and <a
href="http://hadoop.apache.org/core/docs/current/quickstart.html">quickstart</a> it. Here’s a more detailed <a
href="http://wiki.apache.org/hadoop/GettingStartedWithHadoop">set up</a> page.</p><p><a
href="http://wiki.apache.org/hadoop/PoweredBy">The big guys</a> are using it, why aren’t you?</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Hadoop+Primer+%26ndash%3B+Yet+Another+Hadoop+Introduction&amp;link=http://beerpla.net/2008/10/20/hadoop-primer-yet-another-hadoop-introduction/&amp;notes=%20I%20just%20came%20upon%20a%20pretty%20good%20Hadoop%20introduction%20paper%20posted%20on%20Sun%E2%80%99s%20wiki.%20Apache%20Hadoop%20is%20a%20free%20Java%20software%20framework%20that%20supports%20data%20intensive%20distributed%20applications.%20It%20enables%20applications%20to%20work%20with%20thousands%20of%20nodes%20and%20petabytes%20of%20data.%20Hadoop%20was%20inspired%20by%20Google%27s%20MapR&amp;short_link=http://bit.ly/9kKAzp&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=Hadoop+Primer+%26ndash%3B+Yet+Another+Hadoop+Introduction&amp;link=http://beerpla.net/2008/10/20/hadoop-primer-yet-another-hadoop-introduction/&amp;notes=%20I%20just%20came%20upon%20a%20pretty%20good%20Hadoop%20introduction%20paper%20posted%20on%20Sun%E2%80%99s%20wiki.%20Apache%20Hadoop%20is%20a%20free%20Java%20software%20framework%20that%20supports%20data%20intensive%20distributed%20applications.%20It%20enables%20applications%20to%20work%20with%20thousands%20of%20nodes%20and%20petabytes%20of%20data.%20Hadoop%20was%20inspired%20by%20Google%27s%20MapR&amp;short_link=http://bit.ly/9kKAzp&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=Hadoop+Primer+%26ndash%3B+Yet+Another+Hadoop+Introduction&amp;link=http://beerpla.net/2008/10/20/hadoop-primer-yet-another-hadoop-introduction/&amp;notes=%20I%20just%20came%20upon%20a%20pretty%20good%20Hadoop%20introduction%20paper%20posted%20on%20Sun%E2%80%99s%20wiki.%20Apache%20Hadoop%20is%20a%20free%20Java%20software%20framework%20that%20supports%20data%20intensive%20distributed%20applications.%20It%20enables%20applications%20to%20work%20with%20thousands%20of%20nodes%20and%20petabytes%20of%20data.%20Hadoop%20was%20inspired%20by%20Google%27s%20MapR&amp;short_link=http://bit.ly/9kKAzp&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=Hadoop+Primer+%26ndash%3B+Yet+Another+Hadoop+Introduction&amp;link=http://beerpla.net/2008/10/20/hadoop-primer-yet-another-hadoop-introduction/&amp;notes=%20I%20just%20came%20upon%20a%20pretty%20good%20Hadoop%20introduction%20paper%20posted%20on%20Sun%E2%80%99s%20wiki.%20Apache%20Hadoop%20is%20a%20free%20Java%20software%20framework%20that%20supports%20data%20intensive%20distributed%20applications.%20It%20enables%20applications%20to%20work%20with%20thousands%20of%20nodes%20and%20petabytes%20of%20data.%20Hadoop%20was%20inspired%20by%20Google%27s%20MapR&amp;short_link=http://bit.ly/9kKAzp&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=Hadoop+Primer+%26ndash%3B+Yet+Another+Hadoop+Introduction&amp;link=http://beerpla.net/2008/10/20/hadoop-primer-yet-another-hadoop-introduction/&amp;notes=%20I%20just%20came%20upon%20a%20pretty%20good%20Hadoop%20introduction%20paper%20posted%20on%20Sun%E2%80%99s%20wiki.%20Apache%20Hadoop%20is%20a%20free%20Java%20software%20framework%20that%20supports%20data%20intensive%20distributed%20applications.%20It%20enables%20applications%20to%20work%20with%20thousands%20of%20nodes%20and%20petabytes%20of%20data.%20Hadoop%20was%20inspired%20by%20Google%27s%20MapR&amp;short_link=http://bit.ly/9kKAzp&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=Hadoop+Primer+%26ndash%3B+Yet+Another+Hadoop+Introduction&amp;link=http://beerpla.net/2008/10/20/hadoop-primer-yet-another-hadoop-introduction/&amp;notes=%20I%20just%20came%20upon%20a%20pretty%20good%20Hadoop%20introduction%20paper%20posted%20on%20Sun%E2%80%99s%20wiki.%20Apache%20Hadoop%20is%20a%20free%20Java%20software%20framework%20that%20supports%20data%20intensive%20distributed%20applications.%20It%20enables%20applications%20to%20work%20with%20thousands%20of%20nodes%20and%20petabytes%20of%20data.%20Hadoop%20was%20inspired%20by%20Google%27s%20MapR&amp;short_link=http://bit.ly/9kKAzp&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=Hadoop+Primer+%26ndash%3B+Yet+Another+Hadoop+Introduction&amp;link=http://beerpla.net/2008/10/20/hadoop-primer-yet-another-hadoop-introduction/&amp;notes=%20I%20just%20came%20upon%20a%20pretty%20good%20Hadoop%20introduction%20paper%20posted%20on%20Sun%E2%80%99s%20wiki.%20Apache%20Hadoop%20is%20a%20free%20Java%20software%20framework%20that%20supports%20data%20intensive%20distributed%20applications.%20It%20enables%20applications%20to%20work%20with%20thousands%20of%20nodes%20and%20petabytes%20of%20data.%20Hadoop%20was%20inspired%20by%20Google%27s%20MapR&amp;short_link=http://bit.ly/9kKAzp&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=Hadoop%20Primer%20%26ndash%3B%20Yet%20Another%20Hadoop%20Introduction&amp;link=http://beerpla.net/2008/10/20/hadoop-primer-yet-another-hadoop-introduction/&amp;notes=%20I%20just%20came%20upon%20a%20pretty%20good%20Hadoop%20introduction%20paper%20posted%20on%20Sun%E2%80%99s%20wiki.%20Apache%20Hadoop%20is%20a%20free%20Java%20software%20framework%20that%20supports%20data%20intensive%20distributed%20applications.%20It%20enables%20applications%20to%20work%20with%20thousands%20of%20nodes%20and%20petabytes%20of%20data.%20Hadoop%20was%20inspired%20by%20Google%27s%20MapR&amp;short_link=http://bit.ly/9kKAzp&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/15/mysql-conference-liveblogging-the-future-of-mysql-tuesday-1155am-2/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: The Future Of MySQL (Tuesday 11:55AM)</a></li><li><a
href="http://beerpla.net/2010/01/11/web-dev-browser-breakdown-statscharts-from-plaxo-com-for-december-2009-and-thoughts/" rel="bookmark" title="January 11, 2010">[Web Dev] Browser Breakdown Stats+Charts From Plaxo.com For December 2009 And Thoughts</a></li><li><a
href="http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/" rel="bookmark" title="September 3, 2009">Comparison Between Solr And Sphinx Search Servers (Solr Vs Sphinx &#8211; Fight!)</a></li><li><a
href="http://beerpla.net/2008/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/" rel="bookmark" title="September 5, 2008">MySQL Slave Lag (Delay) Explained And 7 Ways To Battle It</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%2F10%2F20%2Fhadoop-primer-yet-another-hadoop-introduction%2F&amp;title=Hadoop%20Primer%20%26ndash%3B%20Yet%20Another%20Hadoop%20Introduction" id="wpa2a_16"><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/10/20/hadoop-primer-yet-another-hadoop-introduction/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>MySQL Slave Lag (Delay) Explained And 7 Ways To Battle It</title><link>http://beerpla.net/2008/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/</link> <comments>http://beerpla.net/2008/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/#comments</comments> <pubDate>Fri, 05 Sep 2008 17:00:40 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[delay]]></category> <category><![CDATA[featured]]></category> <category><![CDATA[help]]></category> <category><![CDATA[hint]]></category> <category><![CDATA[lag]]></category> <category><![CDATA[maatkit]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[replication]]></category> <category><![CDATA[slave]]></category> <category><![CDATA[solution]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/09/05/mysql-slave-delay-explained-and-7-ways-to-battle-it/</guid> <description><![CDATA[<p><img
style="margin: 0px 20px 10px 0px" src="http://forge.mysql.com/w/images/1/1e/Dolphin_Laptop_cropped-386x222.jpg" alt="http://forge.mysql.com/w/images/1/1e/Dolphin_Laptop_cropped-386x222.jpg" width="240" height="200" align="left" />Slave delay can be a nightmare. I battle it every day and know plenty of people who curse the serialization problem of replication. For those who are not familiar with it, replication on MySQL slaves runs commands in series &#8211; one by one, while the master may run them in parallel. This fact usually causes bottlenecks. Consider these 2 examples:</p><ul><li>Between 1 and 100 UPDATE queries are constantly running on the master in parallel. If the slave IO is only fast enough to handle 50 of them without lagging, as soon as 51 start running, the slaves starts to lag.</li><li>A more common problem is when one query takes an hour to run (let&#039;s say, it&#039;s an UPDATE with a</li>...<div
class=clear></div> <a
href="http://beerpla.net/2008/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ul>]]></description> <content:encoded><![CDATA[<p><img
style="margin: 0px 20px 10px 0px" src="http://forge.mysql.com/w/images/1/1e/Dolphin_Laptop_cropped-386x222.jpg" alt="http://forge.mysql.com/w/images/1/1e/Dolphin_Laptop_cropped-386x222.jpg" width="240" height="200" align="left" />Slave delay can be a nightmare. I battle it every day and know plenty of people who curse the serialization problem of replication. For those who are not familiar with it, replication on MySQL slaves runs commands in series &#8211; one by one, while the master may run them in parallel. This fact usually causes bottlenecks. Consider these 2 examples:</p><ul><li>Between 1 and 100 UPDATE queries are constantly running on the master in parallel. If the slave IO is only fast enough to handle 50 of them without lagging, as soon as 51 start running, the slaves starts to lag.</li><li>A more common problem is when one query takes an hour to run (let&#039;s say, it&#039;s an UPDATE with a big WHERE clause that doesn&#039;t use an index). In this case, the query runs on the master for an hour, which isn&#039;t a big problem because it doesn&#039;t block other queries. However, when the query moves over to the slaves, all of them start to lag because it plugs up the single replication thread.</li></ul><p><div
class="note"><div
class="notewarning"><strong>Sidenote:</strong> when I hear an argument that a master has to be the most powerful machine in the group, I cringe at the logic.</p><p>If the master can crunch more INSERTs/UPDATEs after an upgrade to a better machine, then replication will fall behind even faster.</div></div></p><p>There is nothing you can do right now to fix <em><strong>the way</strong></em> MySQL handles replication. If the replication threads could run in parallel, I&#039;m guessing horrible things would happen to the data integrity due to race conditions, canceled queries, slave restarts, differences in query execution times due to server load and configuration, etc. Replication is already an asynchronous, prone to getting out of sync business (hint: use <a
href="http://www.maatkit.org">maatkit</a> tools by Baron Schwartz and specifically <a
href="http://maatkit.sourceforge.net/doc/mk-table-checksum.html">mk-table-checksum</a> and <a
href="http://maatkit.sourceforge.net/doc/mk-table-sync.html">mk-table-sync</a> to sync up your slaves).</p><p>In order to see if a slave is lagging, execute the &#039;show slave status&#039; command and look for the Seconds_Behind_Master value. The way this value is calculated can be slightly ambiguous and unclear, so I&#039;ll explain. It is simply a difference between the 2 timestamps &#8211; the time of the last received (and queued up in the relay log) query that already executed on the master and the time of the currently executing query on the slave. Thus this value is not real time (it is possible to catch up to the master much faster); it&#039;s an approximation, or special metrics if you will, that helps point out problems.</p><p>So what can you do if you start hitting replication lag? This is the ultimate question, and the answer depends on your application. Here are the things I came up with after dealing with MySQL for a few years (there are undoubtedly other techniques, but these all come from my own experience):</p><ol><li>Normalize your data, if it is not already. Non-normalized tables lead to repetition and is generally considered bad practice. More data &#8211; more IO in most cases. There can be cases, however, where you can normalize too much. Having JOINs is much slower than not having them, and it can hurt your queries if you JOIN a lot. Finally, the extreme case is mentioned at <a
href="http://highscalability.com">highscalability.com</a>: <a
href="http://highscalability.com/how-i-learned-stop-worrying-and-love-using-lot-disk-space-scale">How I Learned to Stop Worrying and Love Using a Lot of Disk Space to Scale</a>. &#034;<em>You&#8211;pause for dramatic effect&#8211;<strong>duplicate data instead of <strong>normalize</strong> it</strong>. *shudder*</em>&#034;. Flickr is provided as an example.</li><li>Shard (meaning, slice) your data, horizontally and vertically. For example, you can horizontally partition by some sort of key, hash, username, or other properties. You can also partition vertically by moving out some table columns into other databases. As an example, if you had a database of videos, storing view counts, number of favorites, etc. is OK but if these fields receive a lot of frequent updates, you are bound to have slave lag. Instead, separate these into a dedicated stats table(s). You don&#039;t have to shard all of your data &#8211; even sharding the most active bits helps immensely (for example, you can choose to shard your stats tables and leave the main one alone).</li><li>Upgrade machines running MySQL (first slaves, then master, for the reasons given above). 99% of the time, disk IO is the bottleneck, CPU being the other 1%. Move to RAIDed setups (RAID10 or RAID0) with 6-10 15K RPM SCSI or SSD drives. Add a lot of RAM. Make sure you&#039;re running a 64 bit OS if you have more than 3GB of RAM, so that the mysql process may utilize more of it. My <a
href="http://beerpla.net/2008/06/11/best-mysql-server-under-10k/">search for the best MySQL server under $10K</a> may be of some help here.</li><li>Separate your applications onto different MySQL instances. If you are running separate applications A, B, and C that don&#039;t depend on each other, consider giving them their own machines, otherwise a single long-running UPDATE or INSERT query in application A will delay all writes by application B and C. This is actually quite common &#8211; even though the server may not appear to be loaded, the annoying slave delay will still show its cowardly tail. I want to highlight this again: <span
style="font-size: medium;">the replication thread is shared between all databases on the server</span>.</li><li>Another solution to (4) is multiple MySQL instances, granted that the MySQL machine isn&#039;t generally overloaded already. In that case, installing more than 1 mysql daemons would separate replication threads and allow running multiple applications, like A, B, and C on one machine, without affecting each other. <a
href="https://launchpad.net/mysql-sandbox">MySQL sandbox</a> achieves just that &#8211; it is my preferred solution.</li><li>Split up longer running queries into shorter ones. This should be pretty straightforward &#8211; a single query on 10 million rows may run a few hours. Splitting it into batches of 50,000, for example, will give other queries a chance to run in between. Of course, you should take care of data integrity and generally double check what you are doing.</li><li>Don&#039;t overload the same slave by sending all queries to it, as it will just make the matter worse. You can round-robin the queries using either round-robin DNS (eww), round-robin within the application logic (better), smarter application logic, like checking slave load and status from time to time, or my personal favorite &#8211; using <a
href="http://forge.mysql.com/wiki/MySQL_Proxy">MySQL proxy</a> and having it pick the least lagging slave for you. An official solution utilizing mysql proxy, called <a
href="http://dev.mysql.com/doc/refman/5.1/en/load-balancer.html">MySQL load balancer</a>, is apparently in the works (I was promised beta access but haven&#039;t got it so far).</li></ol><p>As a bonus, I wanted to throw in this idea of helping minimize a certain corner case cause of slave delay and feed it to the hungry MySQL minds. I&#039;m not sure if it is mentioned anywhere else, as I have not Googled it. If it&#039;s a widely known fact, then I will consider this post as just adding my vote to the usefulness of the technique.</p><p><div
class="note"><div
class="notetip"><strong>Tip:</strong> If you have replication setups that use a lot of INSERT commands and you expect that most of such INSERTs would dupe with existing data (and you are using INSERT IGNORE, not REPLACE), consider replacing such queries with SELECTs, followed by only necessary INSERTs.</p><p>The reasoning is simple: INSERTs propagate to all the slaves and have to run on a master. SELECTs can run on any slave and don&#039;t propagate anywhere, so if only 0.01% of the queries result in new rows, this technique will get rid of a lot of unnecessary slave query traffic.</div></div></p><p>Well, there you have it. Comments are open, so feel free to share your own replication strategies and thoughts about mine.</p><div
class='post_blob_1'>Get advantage of our latest <a
href="http://www.test-king.com/exams/642-983.htm">642-983</a> exam products and pass your <a
href="http://www.test-king.com/exams/1Y0-A05.htm">1Y0-A05</a> as well as <a
href="http://www.test-king.com/exams/642-383.htm">642-383</a> exam on first try.</div><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Slave+Lag+%28Delay%29+Explained+And+7+Ways+To+Battle+It&amp;link=http://beerpla.net/2008/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/&amp;notes=Slave%20delay%20can%20be%20a%20nightmare.%20I%20battle%20it%20every%20day%20and%20know%20plenty%20of%20people%20who%20curse%20the%20serialization%20problem%20of%20replication.%20For%20those%20who%20are%20not%20familiar%20with%20it%2C%20replication%20on%20MySQL%20slaves%20runs%20commands%20in%20series%20-%20one%20by%20one%2C%20while%20the%20master%20may%20run%20them%20in%20parallel.%20This%20fact%20usually%20c&amp;short_link=http://bit.ly/9XKLTz&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+Slave+Lag+%28Delay%29+Explained+And+7+Ways+To+Battle+It&amp;link=http://beerpla.net/2008/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/&amp;notes=Slave%20delay%20can%20be%20a%20nightmare.%20I%20battle%20it%20every%20day%20and%20know%20plenty%20of%20people%20who%20curse%20the%20serialization%20problem%20of%20replication.%20For%20those%20who%20are%20not%20familiar%20with%20it%2C%20replication%20on%20MySQL%20slaves%20runs%20commands%20in%20series%20-%20one%20by%20one%2C%20while%20the%20master%20may%20run%20them%20in%20parallel.%20This%20fact%20usually%20c&amp;short_link=http://bit.ly/9XKLTz&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+Slave+Lag+%28Delay%29+Explained+And+7+Ways+To+Battle+It&amp;link=http://beerpla.net/2008/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/&amp;notes=Slave%20delay%20can%20be%20a%20nightmare.%20I%20battle%20it%20every%20day%20and%20know%20plenty%20of%20people%20who%20curse%20the%20serialization%20problem%20of%20replication.%20For%20those%20who%20are%20not%20familiar%20with%20it%2C%20replication%20on%20MySQL%20slaves%20runs%20commands%20in%20series%20-%20one%20by%20one%2C%20while%20the%20master%20may%20run%20them%20in%20parallel.%20This%20fact%20usually%20c&amp;short_link=http://bit.ly/9XKLTz&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+Slave+Lag+%28Delay%29+Explained+And+7+Ways+To+Battle+It&amp;link=http://beerpla.net/2008/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/&amp;notes=Slave%20delay%20can%20be%20a%20nightmare.%20I%20battle%20it%20every%20day%20and%20know%20plenty%20of%20people%20who%20curse%20the%20serialization%20problem%20of%20replication.%20For%20those%20who%20are%20not%20familiar%20with%20it%2C%20replication%20on%20MySQL%20slaves%20runs%20commands%20in%20series%20-%20one%20by%20one%2C%20while%20the%20master%20may%20run%20them%20in%20parallel.%20This%20fact%20usually%20c&amp;short_link=http://bit.ly/9XKLTz&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+Slave+Lag+%28Delay%29+Explained+And+7+Ways+To+Battle+It&amp;link=http://beerpla.net/2008/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/&amp;notes=Slave%20delay%20can%20be%20a%20nightmare.%20I%20battle%20it%20every%20day%20and%20know%20plenty%20of%20people%20who%20curse%20the%20serialization%20problem%20of%20replication.%20For%20those%20who%20are%20not%20familiar%20with%20it%2C%20replication%20on%20MySQL%20slaves%20runs%20commands%20in%20series%20-%20one%20by%20one%2C%20while%20the%20master%20may%20run%20them%20in%20parallel.%20This%20fact%20usually%20c&amp;short_link=http://bit.ly/9XKLTz&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+Slave+Lag+%28Delay%29+Explained+And+7+Ways+To+Battle+It&amp;link=http://beerpla.net/2008/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/&amp;notes=Slave%20delay%20can%20be%20a%20nightmare.%20I%20battle%20it%20every%20day%20and%20know%20plenty%20of%20people%20who%20curse%20the%20serialization%20problem%20of%20replication.%20For%20those%20who%20are%20not%20familiar%20with%20it%2C%20replication%20on%20MySQL%20slaves%20runs%20commands%20in%20series%20-%20one%20by%20one%2C%20while%20the%20master%20may%20run%20them%20in%20parallel.%20This%20fact%20usually%20c&amp;short_link=http://bit.ly/9XKLTz&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+Slave+Lag+%28Delay%29+Explained+And+7+Ways+To+Battle+It&amp;link=http://beerpla.net/2008/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/&amp;notes=Slave%20delay%20can%20be%20a%20nightmare.%20I%20battle%20it%20every%20day%20and%20know%20plenty%20of%20people%20who%20curse%20the%20serialization%20problem%20of%20replication.%20For%20those%20who%20are%20not%20familiar%20with%20it%2C%20replication%20on%20MySQL%20slaves%20runs%20commands%20in%20series%20-%20one%20by%20one%2C%20while%20the%20master%20may%20run%20them%20in%20parallel.%20This%20fact%20usually%20c&amp;short_link=http://bit.ly/9XKLTz&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%20Slave%20Lag%20%28Delay%29%20Explained%20And%207%20Ways%20To%20Battle%20It&amp;link=http://beerpla.net/2008/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/&amp;notes=Slave%20delay%20can%20be%20a%20nightmare.%20I%20battle%20it%20every%20day%20and%20know%20plenty%20of%20people%20who%20curse%20the%20serialization%20problem%20of%20replication.%20For%20those%20who%20are%20not%20familiar%20with%20it%2C%20replication%20on%20MySQL%20slaves%20runs%20commands%20in%20series%20-%20one%20by%20one%2C%20while%20the%20master%20may%20run%20them%20in%20parallel.%20This%20fact%20usually%20c&amp;short_link=http://bit.ly/9XKLTz&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/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><li><a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-portable-scale-out-benchmarks-for-mysql-wednesday-1050am/" rel="bookmark" title="April 16, 2008">MySQL Conference Liveblogging: Portable Scale-out Benchmarks For MySQL (Wednesday 10:50AM)</a></li><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-performance-guide-for-mysql-cluster-tuesday-1050am/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: Performance Guide For MySQL Cluster (Tuesday 10:50AM)</a></li><li><a
href="http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/" rel="bookmark" title="April 17, 2008">MySQL Conference Liveblogging: Optimizing MySQL For High Volume Data Logging Applications (Thursday 2:50PM)</a></li><li><a
href="http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/" rel="bookmark" title="February 17, 2009">Swapping Column Values in MySQL</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%2F09%2F05%2Fmysql-slave-lag-delay-explained-and-7-ways-to-battle-it%2F&amp;title=MySQL%20Slave%20Lag%20%28Delay%29%20Explained%20And%207%20Ways%20To%20Battle%20It" id="wpa2a_18"><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/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>Best MySQL Server Under $10K?</title><link>http://beerpla.net/2008/06/11/best-mysql-server-under-10k/</link> <comments>http://beerpla.net/2008/06/11/best-mysql-server-under-10k/#comments</comments> <pubDate>Wed, 11 Jun 2008 09:30:54 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[best]]></category> <category><![CDATA[featured]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Performance]]></category> <category><![CDATA[server]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/06/11/best-mysql-server-under-10k/</guid> <description><![CDATA[<p><a
href="http://beerpla.net/wp-content/uploads/BestMySQLServerUnder10K_2161/Serverpicture.png" class="lightview" rel="gallery['362']"><img
style="margin: 0px 10px 5px 0px" height="160" alt="Server picture" src="http://beerpla.net/wp-content/uploads/BestMySQLServerUnder10K_2161/Serverpicture_thumb.png" width="240" align="left" /></a> I want to get opinions from outside of my daily circle of people on the best server hardware to use for MySQL. I remember from <a
href="http://beerpla.net/2008/03/24/mysql-conference-2008/">the conference</a> somebody (Pipes?) mentioning a particular Dell server with multiple disk RAID10 that could supposedly be had for about $6k but I completely misplaced the model number (Frank, did you get my email?).</p><p>I know that a multi-disk RAID array with a bunch of fast disks (15k RPM?) is probably the most important method of improving performance, followed by the amount of RAM, so I&#039;m trying to find the best combination/balance of the two. However, server prices on the Internet range so much that I don&#039;t even know where to begin to tell a ...<div
class=clear></div> <a
href="http://beerpla.net/2008/06/11/best-mysql-server-under-10k/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p><a
href="http://beerpla.net/wp-content/uploads/BestMySQLServerUnder10K_2161/Serverpicture.png" class="lightview" rel="gallery['362']"><img
style="margin: 0px 10px 5px 0px" height="160" alt="Server picture" src="http://beerpla.net/wp-content/uploads/BestMySQLServerUnder10K_2161/Serverpicture_thumb.png" width="240" align="left" /></a> I want to get opinions from outside of my daily circle of people on the best server hardware to use for MySQL. I remember from <a
href="http://beerpla.net/2008/03/24/mysql-conference-2008/">the conference</a> somebody (Pipes?) mentioning a particular Dell server with multiple disk RAID10 that could supposedly be had for about $6k but I completely misplaced the model number (Frank, did you get my email?).</p><p>I know that a multi-disk RAID array with a bunch of fast disks (15k RPM?) is probably the most important method of improving performance, followed by the amount of RAM, so I&#039;m trying to find the best combination/balance of the two. However, server prices on the Internet range so much that I don&#039;t even know where to begin to tell a good deal from a bad one. I don&#039;t think SSDs can play a role here, because we need at least 200GB of usable space per machine. For comparison, we currently use the following spec: Dual quadcore Intel, 16GB RAM, 200GB RAID1 + 1TB RAID1 using SATA drives (eww?) in a 2U rack (a bit too chunky, isn&#039;t it?) made by <a
href="http://www.zantaz.com/">Zantaz</a>. It performs quite nicely but I think it chokes on the amount of writes way too early.</p><p>So, what does everyone think the best configuration is under $10,000? Bonus points if you can provide a link to the vendor site or at least a model number!</p><p><div
class="note"><div
class="notetip"><strong>Edit</strong>: so, here&#039;s the final configuration and quote I got from Silicon Mechanics, which I&#039;m quite happy about. It is way under the $10k budget, so mission accomplished:</p><ul><li>RakX 2U chassis</li><li>2x Intel Xeon E5420 Quad-core 2.5Ghz, 12MB cache CPUs</li><li>32GB (16x 2GB) 667Mhz Fully Buffered RAM</li><li>2x integrated gbit NICs</li><li>IPMI 2.0 remote management card with KVM over LAN</li><li>3Ware 9690SA-4I RAID controller with 512MB cache and battery backup</li><li>12x 74GB Seagate Cheetah 15K.5 15KRPM SAS drives</li><li>redundant 700W power supply</li><li>sliding rail kit</li><li>5 year advance component exchange warranty</li><li>OS RAID: 73GB HW RAID1</li><li>DATA RAID: 365GB HW RAID10</li></ul><p>Total price: <strong>$6176</strong> + tax, free shipping.</div></div></p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Best+MySQL+Server+Under+%2410K%3F&amp;link=http://beerpla.net/2008/06/11/best-mysql-server-under-10k/&amp;notes=%20I%20want%20to%20get%20opinions%20from%20outside%20of%20my%20daily%20circle%20of%20people%20on%20the%20best%20server%20hardware%20to%20use%20for%20MySQL.%20I%20remember%20from%20the%20conference%20somebody%20%28Pipes%3F%29%20mentioning%20a%20particular%20Dell%20server%20with%20multiple%20disk%20RAID10%20that%20could%20supposedly%20be%20had%20for%20about%20%246k%20but%20I%20completely%20misplaced%20the%20mod&amp;short_link=http://bit.ly/ctscht&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=Best+MySQL+Server+Under+%2410K%3F&amp;link=http://beerpla.net/2008/06/11/best-mysql-server-under-10k/&amp;notes=%20I%20want%20to%20get%20opinions%20from%20outside%20of%20my%20daily%20circle%20of%20people%20on%20the%20best%20server%20hardware%20to%20use%20for%20MySQL.%20I%20remember%20from%20the%20conference%20somebody%20%28Pipes%3F%29%20mentioning%20a%20particular%20Dell%20server%20with%20multiple%20disk%20RAID10%20that%20could%20supposedly%20be%20had%20for%20about%20%246k%20but%20I%20completely%20misplaced%20the%20mod&amp;short_link=http://bit.ly/ctscht&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=Best+MySQL+Server+Under+%2410K%3F&amp;link=http://beerpla.net/2008/06/11/best-mysql-server-under-10k/&amp;notes=%20I%20want%20to%20get%20opinions%20from%20outside%20of%20my%20daily%20circle%20of%20people%20on%20the%20best%20server%20hardware%20to%20use%20for%20MySQL.%20I%20remember%20from%20the%20conference%20somebody%20%28Pipes%3F%29%20mentioning%20a%20particular%20Dell%20server%20with%20multiple%20disk%20RAID10%20that%20could%20supposedly%20be%20had%20for%20about%20%246k%20but%20I%20completely%20misplaced%20the%20mod&amp;short_link=http://bit.ly/ctscht&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=Best+MySQL+Server+Under+%2410K%3F&amp;link=http://beerpla.net/2008/06/11/best-mysql-server-under-10k/&amp;notes=%20I%20want%20to%20get%20opinions%20from%20outside%20of%20my%20daily%20circle%20of%20people%20on%20the%20best%20server%20hardware%20to%20use%20for%20MySQL.%20I%20remember%20from%20the%20conference%20somebody%20%28Pipes%3F%29%20mentioning%20a%20particular%20Dell%20server%20with%20multiple%20disk%20RAID10%20that%20could%20supposedly%20be%20had%20for%20about%20%246k%20but%20I%20completely%20misplaced%20the%20mod&amp;short_link=http://bit.ly/ctscht&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=Best+MySQL+Server+Under+%2410K%3F&amp;link=http://beerpla.net/2008/06/11/best-mysql-server-under-10k/&amp;notes=%20I%20want%20to%20get%20opinions%20from%20outside%20of%20my%20daily%20circle%20of%20people%20on%20the%20best%20server%20hardware%20to%20use%20for%20MySQL.%20I%20remember%20from%20the%20conference%20somebody%20%28Pipes%3F%29%20mentioning%20a%20particular%20Dell%20server%20with%20multiple%20disk%20RAID10%20that%20could%20supposedly%20be%20had%20for%20about%20%246k%20but%20I%20completely%20misplaced%20the%20mod&amp;short_link=http://bit.ly/ctscht&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=Best+MySQL+Server+Under+%2410K%3F&amp;link=http://beerpla.net/2008/06/11/best-mysql-server-under-10k/&amp;notes=%20I%20want%20to%20get%20opinions%20from%20outside%20of%20my%20daily%20circle%20of%20people%20on%20the%20best%20server%20hardware%20to%20use%20for%20MySQL.%20I%20remember%20from%20the%20conference%20somebody%20%28Pipes%3F%29%20mentioning%20a%20particular%20Dell%20server%20with%20multiple%20disk%20RAID10%20that%20could%20supposedly%20be%20had%20for%20about%20%246k%20but%20I%20completely%20misplaced%20the%20mod&amp;short_link=http://bit.ly/ctscht&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=Best+MySQL+Server+Under+%2410K%3F&amp;link=http://beerpla.net/2008/06/11/best-mysql-server-under-10k/&amp;notes=%20I%20want%20to%20get%20opinions%20from%20outside%20of%20my%20daily%20circle%20of%20people%20on%20the%20best%20server%20hardware%20to%20use%20for%20MySQL.%20I%20remember%20from%20the%20conference%20somebody%20%28Pipes%3F%29%20mentioning%20a%20particular%20Dell%20server%20with%20multiple%20disk%20RAID10%20that%20could%20supposedly%20be%20had%20for%20about%20%246k%20but%20I%20completely%20misplaced%20the%20mod&amp;short_link=http://bit.ly/ctscht&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=Best%20MySQL%20Server%20Under%20%2410K%3F&amp;link=http://beerpla.net/2008/06/11/best-mysql-server-under-10k/&amp;notes=%20I%20want%20to%20get%20opinions%20from%20outside%20of%20my%20daily%20circle%20of%20people%20on%20the%20best%20server%20hardware%20to%20use%20for%20MySQL.%20I%20remember%20from%20the%20conference%20somebody%20%28Pipes%3F%29%20mentioning%20a%20particular%20Dell%20server%20with%20multiple%20disk%20RAID10%20that%20could%20supposedly%20be%20had%20for%20about%20%246k%20but%20I%20completely%20misplaced%20the%20mod&amp;short_link=http://bit.ly/ctscht&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/2006/06/13/amd-plans-major-cpu-price-drops-day-after-conroe/" rel="bookmark" title="June 13, 2006">AMD Plans Major CPU Price Drops Day After Conroe</a></li><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-presentation-at-the-kickfire-booth/" rel="bookmark" title="April 15, 2008">MySQL Conference: Presentation At The Kickfire Booth</a></li><li><a
href="http://beerpla.net/2006/06/12/beer-planet-is-fast-again/" rel="bookmark" title="June 12, 2006">Beer Planet is Fast Again</a></li><li><a
href="http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/" rel="bookmark" title="April 17, 2008">MySQL Conference Liveblogging: Optimizing MySQL For High Volume Data Logging Applications (Thursday 2:50PM)</a></li><li><a
href="http://beerpla.net/2008/09/05/mysql-slave-lag-delay-explained-and-7-ways-to-battle-it/" rel="bookmark" title="September 5, 2008">MySQL Slave Lag (Delay) Explained And 7 Ways To Battle It</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%2F06%2F11%2Fbest-mysql-server-under-10k%2F&amp;title=Best%20MySQL%20Server%20Under%20%2410K%3F" id="wpa2a_20"><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/06/11/best-mysql-server-under-10k/feed/</wfw:commentRss> <slash:comments>21</slash:comments> </item> <item><title>A Better diff Or What To Do When GNU diff Runs Out Of Memory (&quot;diff: memory exhausted&quot;)</title><link>http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/</link> <comments>http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/#comments</comments> <pubDate>Mon, 12 May 2008 15:57:01 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[comparison]]></category> <category><![CDATA[delta]]></category> <category><![CDATA[diff]]></category> <category><![CDATA[memory exhausted]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[out of memory]]></category> <category><![CDATA[rdiff]]></category> <category><![CDATA[rsync]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/</guid> <description><![CDATA[<p>Recently I ran into major problems using GNU diff. It would crash with &#034;diff: memory exhausted&#034; after only a few minutes trying to process the differences between a couple 4.5GB files. Even a beefy box with 9GB of RAM would run out of it in minutes.</p><p>There is a different solution, however, that is not dependent on file sizes. Enter <strong>rdiff</strong> &#8211; rsync&#039;s backbone. You can read about it here: <a
href="http://en.wikipedia.org/wiki/Rsync">http://en.wikipedia.org/wiki/Rsync</a> (search for rdiff).</p><p><strong>The upsides of rdiff are:</strong><ul><li>with the same 4.5GB files, rdiff only ate about 66MB of RAM and scaled very well. It never crashed to date.</li><li>it is also MUCH faster than diff.</li><li>rdiff itself combines both diff and patch capabilities, so you can create deltas</li></ul>...<div
class=clear></div> <a
href="http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p>Recently I ran into major problems using GNU diff. It would crash with &#034;diff: memory exhausted&#034; after only a few minutes trying to process the differences between a couple 4.5GB files. Even a beefy box with 9GB of RAM would run out of it in minutes.<p>There is a different solution, however, that is not dependent on file sizes. Enter <strong>rdiff</strong> &#8211; rsync&#039;s backbone. You can read about it here: <a
href="http://en.wikipedia.org/wiki/Rsync">http://en.wikipedia.org/wiki/Rsync</a> (search for rdiff).<p><strong>The upsides of rdiff are:</strong><ul><li>with the same 4.5GB files, rdiff only ate about 66MB of RAM and scaled very well. It never crashed to date.<li>it is also MUCH faster than diff.<li>rdiff itself combines both diff and patch capabilities, so you can create deltas and apply them using the same program</li></ul><p><strong>The downsides of rdiff are:</strong><ul><li>it&#039;s not part of standard Linux/UNIX distribution &#8211; you have to install the librsync package.<li>delta files rdiff produces have a slightly different format than diff&#039;s.<li>delta files are slightly larger (but not significantly enough to care).<li>a slightly different approach is used when generating a delta with rdiff, which is both good and bad &#8211; 2 steps are required. The first one produces a special signature file. In the second step, a delta is created using another rdiff call (all shown below). While the 2-step process may seem annoying, it has the benefits of providing faster deltas than when using diff. In fact, you can pipe the first step into the second one without any trouble if you want, which is what I ended up doing).</li></ul><p><strong>Usage:</strong></p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td
class="code"><pre>$ rdiff signature ORIGINAL.txt SIGNATURE.sig
&nbsp;
$ l -h SIGNATURE.sig
-rw-r--r-- 1 user users 25M 2008-04-23 22:32 SIGNATURE.sig
&nbsp;
$ rdiff delta SIGNATURE.sig MODIFIED.txt DELTA.rdiff
&nbsp;
$ l -h DELTA.rdiff
-rw-r--r-- 1 user users 82M 2008-04-23 22:36 DELTA.rdiff</pre></td></tr></table></div><p>And here&#039;s what you would do to reassemble MODIFIED.txt:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td
class="code"><pre>$ rdiff patch ORIGINAL.txt DELTA.rdiff MODIFIED_REASSEMBLED.txt
&nbsp;
$ l *.txt
-rw-r--r-- 1 user users 4,471,493,588 2008-04-23 20:24 MODIFIED.txt
-rw-r--r-- 1 user users 4,471,493,588 2008-04-23 22:44 MODIFIED_REASSEMBLED.txt
-rw-r--r-- 1 user users 4,403,302,981 2008-04-23 20:20 ORIGINAL.txt</pre></td></tr></table></div><p>Just as expected &#8211; everything matches.</p><p>Now, all of this could have been done in one go like this:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre>rdiff signature ORIGINAL.txt | rdiff delta -- - MODIFIED.txt DELTA.rdiff</pre></td></tr></table></div><p><p>As far as my usage of such a useful diff program, I was doing CSV dumps of certain fields from a MySQL database, like so:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre>SELECT * FROM table WHERE some_condition='1' ORDER BY id DESC INTO OUTFILE '/home/dump/dump.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '&quot;';</pre></td></tr></table></div><p>and then applying rdiff to get the [quite small] daily deltas.</p><p>That&#039;s all folks!</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=A+Better+diff+Or+What+To+Do+When+GNU+diff+Runs+Out+Of+Memory+%28%26quot%3Bdiff%3A+memory+exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&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=A+Better+diff+Or+What+To+Do+When+GNU+diff+Runs+Out+Of+Memory+%28%26quot%3Bdiff%3A+memory+exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&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=A+Better+diff+Or+What+To+Do+When+GNU+diff+Runs+Out+Of+Memory+%28%26quot%3Bdiff%3A+memory+exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&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=A+Better+diff+Or+What+To+Do+When+GNU+diff+Runs+Out+Of+Memory+%28%26quot%3Bdiff%3A+memory+exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&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=A+Better+diff+Or+What+To+Do+When+GNU+diff+Runs+Out+Of+Memory+%28%26quot%3Bdiff%3A+memory+exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&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=A+Better+diff+Or+What+To+Do+When+GNU+diff+Runs+Out+Of+Memory+%28%26quot%3Bdiff%3A+memory+exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&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=A+Better+diff+Or+What+To+Do+When+GNU+diff+Runs+Out+Of+Memory+%28%26quot%3Bdiff%3A+memory+exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&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=A%20Better%20diff%20Or%20What%20To%20Do%20When%20GNU%20diff%20Runs%20Out%20Of%20Memory%20%28%26quot%3Bdiff%3A%20memory%20exhausted%26quot%3B%29&amp;link=http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/&amp;notes=Recently%20I%20ran%20into%20major%20problems%20using%20GNU%20diff.%20It%20would%20crash%20with%20%22diff%3A%20memory%20exhausted%22%20after%20only%20a%20few%20minutes%20trying%20to%20process%20the%20differences%20between%20a%20couple%204.5GB%20files.%20Even%20a%20beefy%20box%20with%209GB%20of%20RAM%20would%20run%20out%20of%20it%20in%20minutes.%20%20There%20is%20a%20different%20solution%2C%20however%2C%20that%20is%20n&amp;short_link=http://bit.ly/cpIVIu&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/2007/08/04/watch-a-useful-linux-command-you-may-have-never-heard-of/" rel="bookmark" title="August 4, 2007">Watch &#8211; A Useful Linux Command You May Have Never Heard Of</a></li><li><a
href="http://beerpla.net/2007/07/09/how-to-download-and-install-windows-media-player-11-bypassing-wga/" rel="bookmark" title="July 9, 2007">How To Download And Install Windows Media Player 11 Bypassing WGA</a></li><li><a
href="http://beerpla.net/2008/03/25/navicat-for-mysql-bugs-filed/" rel="bookmark" title="March 25, 2008">Navicat For MySQL Bugs Filed</a></li><li><a
href="http://beerpla.net/2006/07/15/converting-from-cvs-to-svn-developers-notes-and-why-svn-is-better/" rel="bookmark" title="July 15, 2006">Converting from CVS to SVN: Developer&#039;s Notes And Why SVN Is Better</a></li><li><a
href="http://beerpla.net/2008/06/16/how-to-svn-update-all-your-wordpress-plugins-in-one-go/" rel="bookmark" title="June 16, 2008">How To SVN Update All Your WordPress Plugins In One Go</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%2F05%2F12%2Fa-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted%2F&amp;title=A%20Better%20diff%20Or%20What%20To%20Do%20When%20GNU%20diff%20Runs%20Out%20Of%20Memory%20%28%26quot%3Bdiff%3A%20memory%20exhausted%26quot%3B%29" id="wpa2a_22"><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/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Sun Definitely Developing A Phone This Year</title><link>http://beerpla.net/2008/04/21/sun-definitely-developing-a-phone/</link> <comments>http://beerpla.net/2008/04/21/sun-definitely-developing-a-phone/#comments</comments> <pubDate>Tue, 22 Apr 2008 02:30:06 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Beer Planet]]></category> <category><![CDATA[Databases]]></category> <category><![CDATA[Technology]]></category> <category><![CDATA[apple]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[iphone]]></category> <category><![CDATA[mobile]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[phone]]></category> <category><![CDATA[sun]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/04/21/sun-definitely-developing-a-phone/</guid> <description><![CDATA[<p><a
href="http://beerpla.net/wp-content/uploads/SUNDefinitelyDevelopingAPhone_A984/JavaFX_Mobile.png" class="lightview" rel="gallery['347']"><img
style="margin: 0px 10px 10px 0px" src="http://beerpla.net/wp-content/uploads/SUNDefinitelyDevelopingAPhone_A984/JavaFX_Mobile_thumb.png" alt="JavaFX_Mobile" width="142" height="240" align="left" /></a> One thing that still springs to mind when I think of the <a
href="http://beerpla.net/?s=mysql+conference">MySQL User Conference</a> last week is Sun&#039;s opening keynote. While talking about Sun&#039;s market penetration with open source software, <a
href="http://blogs.sun.com/jonathan/">Jonathan Schwartz</a>, Sun&#039;s CEO, slipped in a short mention of the mobile market saying something along the lines of &#034;Sun is going to be entering the mobile market later on this year&#034;. He didn&#039;t spend more than 5 seconds talking about it, moving on to <a
href="http://beerpla.net/2008/01/16/sun-buys-mysql/">the acquisition of MySQL</a>.</p><p>Last year, Sun already made an announcement of <a
href="http://www.engadget.com/2007/05/10/sun-shows-iphone-like-java-mobile-fx-platform/">JavaFX</a>, a Java-based mobile platform but didn&#039;t provide any concrete timelines, so I was excited to hear the more on the subject. With Apple iPhone&#039;s advent last year and ...<div
class=clear></div> <a
href="http://beerpla.net/2008/04/21/sun-definitely-developing-a-phone/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p><a
href="http://beerpla.net/wp-content/uploads/SUNDefinitelyDevelopingAPhone_A984/JavaFX_Mobile.png" class="lightview" rel="gallery['347']"><img
style="margin: 0px 10px 10px 0px" src="http://beerpla.net/wp-content/uploads/SUNDefinitelyDevelopingAPhone_A984/JavaFX_Mobile_thumb.png" alt="JavaFX_Mobile" width="142" height="240" align="left" /></a> One thing that still springs to mind when I think of the <a
href="http://beerpla.net/?s=mysql+conference">MySQL User Conference</a> last week is Sun&#039;s opening keynote. While talking about Sun&#039;s market penetration with open source software, <a
href="http://blogs.sun.com/jonathan/">Jonathan Schwartz</a>, Sun&#039;s CEO, slipped in a short mention of the mobile market saying something along the lines of &#034;Sun is going to be entering the mobile market later on this year&#034;. He didn&#039;t spend more than 5 seconds talking about it, moving on to <a
href="http://beerpla.net/2008/01/16/sun-buys-mysql/">the acquisition of MySQL</a>.</p><p>Last year, Sun already made an announcement of <a
href="http://www.engadget.com/2007/05/10/sun-shows-iphone-like-java-mobile-fx-platform/">JavaFX</a>, a Java-based mobile platform but didn&#039;t provide any concrete timelines, so I was excited to hear the more on the subject. With Apple iPhone&#039;s advent last year and Google entering the same space later on this year with <a
href="http://www.openhandsetalliance.com/android_overview.html">Android</a>, Sun&#039;s addition to the game definitely won&#039;t hurt consumers. After all, competition usually leads to better products.</p><p>So when is the phone coming, Jonathan? My guess is you&#039;re going to try as hard as possible to compete with Google&#039;s <a
href="http://googleblog.blogspot.com/2007/11/wheres-my-gphone.html">second half of 2008 timeline</a> but are you going to manage to beat it? And will it blow us away? I guess time will show.</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Sun+Definitely+Developing+A+Phone+This+Year&amp;link=http://beerpla.net/2008/04/21/sun-definitely-developing-a-phone/&amp;notes=%20One%20thing%20that%20still%20springs%20to%20mind%20when%20I%20think%20of%20the%20MySQL%20User%20Conference%20last%20week%20is%20Sun%27s%20opening%20keynote.%20While%20talking%20about%20Sun%27s%20market%20penetration%20with%20open%20source%20software%2C%20Jonathan%20Schwartz%2C%20Sun%27s%20CEO%2C%20slipped%20in%20a%20short%20mention%20of%20the%20mobile%20market%20saying%20something%20along%20the%20lines%20o&amp;short_link=http://bit.ly/dul6E0&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=Sun+Definitely+Developing+A+Phone+This+Year&amp;link=http://beerpla.net/2008/04/21/sun-definitely-developing-a-phone/&amp;notes=%20One%20thing%20that%20still%20springs%20to%20mind%20when%20I%20think%20of%20the%20MySQL%20User%20Conference%20last%20week%20is%20Sun%27s%20opening%20keynote.%20While%20talking%20about%20Sun%27s%20market%20penetration%20with%20open%20source%20software%2C%20Jonathan%20Schwartz%2C%20Sun%27s%20CEO%2C%20slipped%20in%20a%20short%20mention%20of%20the%20mobile%20market%20saying%20something%20along%20the%20lines%20o&amp;short_link=http://bit.ly/dul6E0&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=Sun+Definitely+Developing+A+Phone+This+Year&amp;link=http://beerpla.net/2008/04/21/sun-definitely-developing-a-phone/&amp;notes=%20One%20thing%20that%20still%20springs%20to%20mind%20when%20I%20think%20of%20the%20MySQL%20User%20Conference%20last%20week%20is%20Sun%27s%20opening%20keynote.%20While%20talking%20about%20Sun%27s%20market%20penetration%20with%20open%20source%20software%2C%20Jonathan%20Schwartz%2C%20Sun%27s%20CEO%2C%20slipped%20in%20a%20short%20mention%20of%20the%20mobile%20market%20saying%20something%20along%20the%20lines%20o&amp;short_link=http://bit.ly/dul6E0&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=Sun+Definitely+Developing+A+Phone+This+Year&amp;link=http://beerpla.net/2008/04/21/sun-definitely-developing-a-phone/&amp;notes=%20One%20thing%20that%20still%20springs%20to%20mind%20when%20I%20think%20of%20the%20MySQL%20User%20Conference%20last%20week%20is%20Sun%27s%20opening%20keynote.%20While%20talking%20about%20Sun%27s%20market%20penetration%20with%20open%20source%20software%2C%20Jonathan%20Schwartz%2C%20Sun%27s%20CEO%2C%20slipped%20in%20a%20short%20mention%20of%20the%20mobile%20market%20saying%20something%20along%20the%20lines%20o&amp;short_link=http://bit.ly/dul6E0&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=Sun+Definitely+Developing+A+Phone+This+Year&amp;link=http://beerpla.net/2008/04/21/sun-definitely-developing-a-phone/&amp;notes=%20One%20thing%20that%20still%20springs%20to%20mind%20when%20I%20think%20of%20the%20MySQL%20User%20Conference%20last%20week%20is%20Sun%27s%20opening%20keynote.%20While%20talking%20about%20Sun%27s%20market%20penetration%20with%20open%20source%20software%2C%20Jonathan%20Schwartz%2C%20Sun%27s%20CEO%2C%20slipped%20in%20a%20short%20mention%20of%20the%20mobile%20market%20saying%20something%20along%20the%20lines%20o&amp;short_link=http://bit.ly/dul6E0&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=Sun+Definitely+Developing+A+Phone+This+Year&amp;link=http://beerpla.net/2008/04/21/sun-definitely-developing-a-phone/&amp;notes=%20One%20thing%20that%20still%20springs%20to%20mind%20when%20I%20think%20of%20the%20MySQL%20User%20Conference%20last%20week%20is%20Sun%27s%20opening%20keynote.%20While%20talking%20about%20Sun%27s%20market%20penetration%20with%20open%20source%20software%2C%20Jonathan%20Schwartz%2C%20Sun%27s%20CEO%2C%20slipped%20in%20a%20short%20mention%20of%20the%20mobile%20market%20saying%20something%20along%20the%20lines%20o&amp;short_link=http://bit.ly/dul6E0&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=Sun+Definitely+Developing+A+Phone+This+Year&amp;link=http://beerpla.net/2008/04/21/sun-definitely-developing-a-phone/&amp;notes=%20One%20thing%20that%20still%20springs%20to%20mind%20when%20I%20think%20of%20the%20MySQL%20User%20Conference%20last%20week%20is%20Sun%27s%20opening%20keynote.%20While%20talking%20about%20Sun%27s%20market%20penetration%20with%20open%20source%20software%2C%20Jonathan%20Schwartz%2C%20Sun%27s%20CEO%2C%20slipped%20in%20a%20short%20mention%20of%20the%20mobile%20market%20saying%20something%20along%20the%20lines%20o&amp;short_link=http://bit.ly/dul6E0&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=Sun%20Definitely%20Developing%20A%20Phone%20This%20Year&amp;link=http://beerpla.net/2008/04/21/sun-definitely-developing-a-phone/&amp;notes=%20One%20thing%20that%20still%20springs%20to%20mind%20when%20I%20think%20of%20the%20MySQL%20User%20Conference%20last%20week%20is%20Sun%27s%20opening%20keynote.%20While%20talking%20about%20Sun%27s%20market%20penetration%20with%20open%20source%20software%2C%20Jonathan%20Schwartz%2C%20Sun%27s%20CEO%2C%20slipped%20in%20a%20short%20mention%20of%20the%20mobile%20market%20saying%20something%20along%20the%20lines%20o&amp;short_link=http://bit.ly/dul6E0&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/2009/11/21/meet-firefox-for-mobile-video-feature-highlights-more-info/" rel="bookmark" title="November 21, 2009">Meet Firefox For Mobile [Video + Feature Highlights + More Info]</a></li><li><a
href="http://beerpla.net/2007/07/17/the-most-accurate-apple-iphone-review-to-date-from-maddox/" rel="bookmark" title="July 17, 2007">The Most Accurate Apple iPhone Review To Date From Maddox</a></li><li><a
href="http://beerpla.net/2009/09/03/htc-hero-coming-to-sprint-october-11th-179-99-powerful-and-sexy-here-is-why-you-need-to-own-it/" rel="bookmark" title="September 3, 2009">HTC Hero Coming To Sprint October 11th! $179.99, Powerful, And Sexy. Here Is Why You Need To Own It</a></li><li><a
href="http://beerpla.net/2009/10/19/impressions-from-the-stackoverflows-devdays-conference-in-san-francisco/" rel="bookmark" title="October 19, 2009">Impressions From The StackOverflow&#039;s DevDays Conference In San Francisco</a></li><li><a
href="http://beerpla.net/2008/01/16/sun-buys-mysql/" rel="bookmark" title="January 16, 2008">Sun buys MySQL for $1bln!</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%2F21%2Fsun-definitely-developing-a-phone%2F&amp;title=Sun%20Definitely%20Developing%20A%20Phone%20This%20Year" id="wpa2a_24"><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/21/sun-definitely-developing-a-phone/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>MySQL Conference Liveblogging: Optimizing MySQL For High Volume Data Logging Applications (Thursday 2:50PM)</title><link>http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/</link> <comments>http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/#comments</comments> <pubDate>Thu, 17 Apr 2008 21:56:06 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[application]]></category> <category><![CDATA[conference]]></category> <category><![CDATA[high volume]]></category> <category><![CDATA[logging]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[optimize]]></category> <category><![CDATA[scale]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/</guid> <description><![CDATA[<ul><li><a
title="http://en.oreilly.com/mysql2008/public/schedule/detail/874" href="http://en.oreilly.com/mysql2008/public/schedule/detail/874">http://en.oreilly.com/mysql2008/public/schedule/detail/874</a></li><li>presented by <a
href="http://en.oreilly.com/mysql2008/public/schedule/speaker/1287">Charles Lee</a> of <a
href="http://hyperic.com/">Hyperic</a></li><li>Hyperic has the best performance with MySQL out of MySQL, Oracle, and Postgres in their application</li><li><em>I suddenly remember hyperic was highly recommended above nagios in </em><a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/"><em>MySQL Conference Liveblogging: Monitoring Tools (Wednesday 5:15PM)</em></a></li><li>performance bottleneck</li></ul><ul><li>the database</li></ul><ul><li>CPU</li><li>memory</li></ul><li>IO</li><ul><li>disk latency</li><li>network latency</li></ul><li>slow queries</li><li>media size deployment example</li><ul><li>300 platforms (300 remote agents collecting data)</li><li>2,100 servers</li><li>21,000 services (10 services per server), <em>sounds feasible</em></li><li>468,000 metrics (20 metrics per service)</li><li>28,800,000 metric data rows per day</li><li>larger deployments have a lot more of these (<em>sounds crazy</em>)</li></ul><li>data</li><ul><li>measurement_id</li><li>timestamp</li><li>value</li><li>primary key (timestamp, measurement_id)</li></ul><li>data flow</li><ul><li>agent collects data and sends reports to server with multiple data points</li>...<div
class=clear></div> <a
href="http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ul>]]></description> <content:encoded><![CDATA[<ul><li><a
title="http://en.oreilly.com/mysql2008/public/schedule/detail/874" href="http://en.oreilly.com/mysql2008/public/schedule/detail/874">http://en.oreilly.com/mysql2008/public/schedule/detail/874</a></li><li>presented by <a
href="http://en.oreilly.com/mysql2008/public/schedule/speaker/1287">Charles Lee</a> of <a
href="http://hyperic.com/">Hyperic</a></li><li>Hyperic has the best performance with MySQL out of MySQL, Oracle, and Postgres in their application</li><li><em>I suddenly remember hyperic was highly recommended above nagios in </em><a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/"><em>MySQL Conference Liveblogging: Monitoring Tools (Wednesday 5:15PM)</em></a></li><li>performance bottleneck</li><ul><li>the database</li><ul><li>CPU</li><li>memory</li></ul><li>IO</li><ul><li>disk latency</li><li>network latency</li></ul><li>slow queries</li></ul><li>media size deployment example</li><ul><li>300 platforms (300 remote agents collecting data)</li><li>2,100 servers</li><li>21,000 services (10 services per server), <em>sounds feasible</em></li><li>468,000 metrics (20 metrics per service)</li><li>28,800,000 metric data rows per day</li><li>larger deployments have a lot more of these (<em>sounds crazy</em>)</li></ul><li>data</li><ul><li>measurement_id</li><li>timestamp</li><li>value</li><li>primary key (timestamp, measurement_id)</li></ul><li>data flow</li><ul><li>agent collects data and sends reports to server with multiple data points</li><li>server batch inserts metric data points</li><li>if network connection fails, agent continues to collect but server &#034;backfills&#034; unavailable</li><li>when agent reconnects, spooled data overwrite backfilled data points (<em>why not use REPLACE for all inserts?</em>)</li></ul><li><em>things are very basic so far</em></li><li>batch insert</li><ul><li>INSERT INTO TABLE (a,b,c) VALUES (0,0,0), (1,1,1),&#8230;</li><li>using MySQL batch insert statements vs prepared statements with multiple queries in other databases seems to improve overall performance by 30%</li><li>batch inserts are limited by &#039;max_allowed_packet&#039;</li></ul><li>other options for increasing insert speed</li><ul><li>set unique_checks=0, insert, set unique_checks=1 (<em>definitely need to make sure data is valid first</em>)</li><li>set foreign_key_checks=0, insert, set foreign_key_checks=1 (<em>same concerns as above</em>)</li><li>Hyperic doesn&#039;t use the 2 above</li></ul><li>INSERT &#8230; ON DUPLICATE KEY UPDATE</li><ul><li>when regular INSERT fails, retry batch with INSERT ON DUPLICATE KEY syntax</li><li>it&#039;s much slower but it allows</li></ul><li><em>this is all basic, where are the performance tweaks?!</em></li><li>batch aggregate inserter</li><ul><li>queue metric data from separate agent reports</li><ul><li>minimize number of inserts, connections, CPU load</li><li>maximize workload efficiency</li></ul><li>optimal configuration for 700 agents</li><ul><li>3 workers</li><li>2000 batch size seems to work best</li><li>queue size of 4,000,000</li></ul><li>this seems to peak at 2.2mil metric data inserts per minute</li></ul><li>data consolidation</li><ul><li>inspired by rrdtool</li><li>lower resolution tables track min, avg, and max</li><li>data compression runs hourly</li><li>size limit 2 days</li><li>every hour, data is rolled up into another table that holds hourly aggregated values with size limit 14 days, then that one gets rolled up into a monthly table, etc</li><li><em>this is is a good approach if you don&#039;t care about each data point</em></li></ul><li><em>I&#039;m overwhelmed by the amount of &#034;you know&#034;s from the speaker. Parasite words, ahh! Sorry Charles <img
src='http://beerpla.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </em></li><li>software partitioning</li><ul><li>measurement data split into 18 tables, representing 9 days (2 per day)</li><li>they didn&#039;t want to do more than 2 SELECTs to get data per day, hence such sharding</li><li><em>oddly, Charles didn&#039;t actually use the word &#039;shard&#039; once</em></li><li>tables truncated, rather than deleting rows =&gt; huge performance boost</li><li>truncation vs deletion</li><ul><li>deletion causes contention on rows</li><li>truncation doesn&#039;t produce fragmentation</li><li>truncation just drops and recreates the table &#8211; single DDL operation</li></ul></ul><li>indexes</li><ul><li>every <strong>InnoDB</strong> table has a special index called the <strong>clustered index</strong> (based on primary key) where the physical data for the rows is stored</li><li>advantages</li><ul><li>selects faster &#8211; row data is on the same page where the index search leads</li><li>inserts in (timestamp) order &#8211; avoid page splits and fragmentation</li></ul><li>shows comparison between non-clustered index and clustered index (see slides)</li></ul><li><em>still no mention of configuration tweaks</em></li><li>UNION ALL works better than inner SELECTS because the optimizer didn&#039;t optimize them enough (at least in the version these guys are using, not sure which)</li><li><em>recommended server options are on the very last slide, I was waiting for those the most! I guess I&#039;ll look up the slides after</em></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+Optimizing+MySQL+For+High+Volume+Data+Logging+Applications+%28Thursday+2%3A50PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/&amp;notes=%20http%3A%2F%2Fen.oreilly.com%2Fmysql2008%2Fpublic%2Fschedule%2Fdetail%2F874%20presented%20by%20Charles%20Lee%20of%20Hyperic%20Hyperic%20has%20the%20best%20performance%20with%20MySQL%20out%20of%20MySQL%2C%20Oracle%2C%20and%20Postgres%20in%20their%20application%20I%20suddenly%20remember%20hyperic%20was%20highly%20recommended%20above%20nagios%20in%20MySQL%20Conference%20Liveblogging%3A%20Monito&amp;short_link=http://bit.ly/cmLynB&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+Optimizing+MySQL+For+High+Volume+Data+Logging+Applications+%28Thursday+2%3A50PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/&amp;notes=%20http%3A%2F%2Fen.oreilly.com%2Fmysql2008%2Fpublic%2Fschedule%2Fdetail%2F874%20presented%20by%20Charles%20Lee%20of%20Hyperic%20Hyperic%20has%20the%20best%20performance%20with%20MySQL%20out%20of%20MySQL%2C%20Oracle%2C%20and%20Postgres%20in%20their%20application%20I%20suddenly%20remember%20hyperic%20was%20highly%20recommended%20above%20nagios%20in%20MySQL%20Conference%20Liveblogging%3A%20Monito&amp;short_link=http://bit.ly/cmLynB&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+Optimizing+MySQL+For+High+Volume+Data+Logging+Applications+%28Thursday+2%3A50PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/&amp;notes=%20http%3A%2F%2Fen.oreilly.com%2Fmysql2008%2Fpublic%2Fschedule%2Fdetail%2F874%20presented%20by%20Charles%20Lee%20of%20Hyperic%20Hyperic%20has%20the%20best%20performance%20with%20MySQL%20out%20of%20MySQL%2C%20Oracle%2C%20and%20Postgres%20in%20their%20application%20I%20suddenly%20remember%20hyperic%20was%20highly%20recommended%20above%20nagios%20in%20MySQL%20Conference%20Liveblogging%3A%20Monito&amp;short_link=http://bit.ly/cmLynB&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+Optimizing+MySQL+For+High+Volume+Data+Logging+Applications+%28Thursday+2%3A50PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/&amp;notes=%20http%3A%2F%2Fen.oreilly.com%2Fmysql2008%2Fpublic%2Fschedule%2Fdetail%2F874%20presented%20by%20Charles%20Lee%20of%20Hyperic%20Hyperic%20has%20the%20best%20performance%20with%20MySQL%20out%20of%20MySQL%2C%20Oracle%2C%20and%20Postgres%20in%20their%20application%20I%20suddenly%20remember%20hyperic%20was%20highly%20recommended%20above%20nagios%20in%20MySQL%20Conference%20Liveblogging%3A%20Monito&amp;short_link=http://bit.ly/cmLynB&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+Optimizing+MySQL+For+High+Volume+Data+Logging+Applications+%28Thursday+2%3A50PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/&amp;notes=%20http%3A%2F%2Fen.oreilly.com%2Fmysql2008%2Fpublic%2Fschedule%2Fdetail%2F874%20presented%20by%20Charles%20Lee%20of%20Hyperic%20Hyperic%20has%20the%20best%20performance%20with%20MySQL%20out%20of%20MySQL%2C%20Oracle%2C%20and%20Postgres%20in%20their%20application%20I%20suddenly%20remember%20hyperic%20was%20highly%20recommended%20above%20nagios%20in%20MySQL%20Conference%20Liveblogging%3A%20Monito&amp;short_link=http://bit.ly/cmLynB&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+Optimizing+MySQL+For+High+Volume+Data+Logging+Applications+%28Thursday+2%3A50PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/&amp;notes=%20http%3A%2F%2Fen.oreilly.com%2Fmysql2008%2Fpublic%2Fschedule%2Fdetail%2F874%20presented%20by%20Charles%20Lee%20of%20Hyperic%20Hyperic%20has%20the%20best%20performance%20with%20MySQL%20out%20of%20MySQL%2C%20Oracle%2C%20and%20Postgres%20in%20their%20application%20I%20suddenly%20remember%20hyperic%20was%20highly%20recommended%20above%20nagios%20in%20MySQL%20Conference%20Liveblogging%3A%20Monito&amp;short_link=http://bit.ly/cmLynB&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+Optimizing+MySQL+For+High+Volume+Data+Logging+Applications+%28Thursday+2%3A50PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/&amp;notes=%20http%3A%2F%2Fen.oreilly.com%2Fmysql2008%2Fpublic%2Fschedule%2Fdetail%2F874%20presented%20by%20Charles%20Lee%20of%20Hyperic%20Hyperic%20has%20the%20best%20performance%20with%20MySQL%20out%20of%20MySQL%2C%20Oracle%2C%20and%20Postgres%20in%20their%20application%20I%20suddenly%20remember%20hyperic%20was%20highly%20recommended%20above%20nagios%20in%20MySQL%20Conference%20Liveblogging%3A%20Monito&amp;short_link=http://bit.ly/cmLynB&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%20Optimizing%20MySQL%20For%20High%20Volume%20Data%20Logging%20Applications%20%28Thursday%202%3A50PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/&amp;notes=%20http%3A%2F%2Fen.oreilly.com%2Fmysql2008%2Fpublic%2Fschedule%2Fdetail%2F874%20presented%20by%20Charles%20Lee%20of%20Hyperic%20Hyperic%20has%20the%20best%20performance%20with%20MySQL%20out%20of%20MySQL%2C%20Oracle%2C%20and%20Postgres%20in%20their%20application%20I%20suddenly%20remember%20hyperic%20was%20highly%20recommended%20above%20nagios%20in%20MySQL%20Conference%20Liveblogging%3A%20Monito&amp;short_link=http://bit.ly/cmLynB&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/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><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: EXPLAIN Demystified (Tuesday 2:00PM)</a></li><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-performance-guide-for-mysql-cluster-tuesday-1050am/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: Performance Guide For MySQL Cluster (Tuesday 10:50AM)</a></li><li><a
href="http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/" rel="bookmark" title="February 17, 2009">Swapping Column Values in MySQL</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></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%2F17%2Fmysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm%2F&amp;title=MySQL%20Conference%20Liveblogging%3A%20Optimizing%20MySQL%20For%20High%20Volume%20Data%20Logging%20Applications%20%28Thursday%202%3A50PM%29" id="wpa2a_26"><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/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>MySQL Conference Liveblogging: MySQL Hidden Treasures (Thursday 11:55PM)</title><link>http://beerpla.net/2008/04/17/mysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm/</link> <comments>http://beerpla.net/2008/04/17/mysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm/#comments</comments> <pubDate>Thu, 17 Apr 2008 19:01:14 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[conference]]></category> <category><![CDATA[hidden]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[treasures]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/04/17/mysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm/</guid> <description><![CDATA[<ul><li><a
href="http://en.oreilly.com/mysql2008/public/schedule/speaker/1218">Damien Seguy</a> of Nexen Services presents</li><li>easiest session of all (phew, that&#039;s a relief)</li><li>clever SQL recipes</li><li>tweaking SQL queries</li><li>shows an example where SELECT is ORDERED by a column that is actually an enum.</li></ul><ul><li>an enum is both a string and a number</li><li>sorted by number</li><li>displayed as string</li><li>can be sorted by string if it&#039;s cast as string</li></ul><li>compact column</li><ul><li>compacts storage</li><li>faster to search</li><li>if (var)char is turned into enum, some space can be saved, shows example</li></ul><li>random order</li><ul><li>order by rand(1) &#8211; obviously</li><li>the integer parameter is actually a seed</li><li>really slow, also obviously, especially for larger tables because it has to order first, then apply rand() to the list</li><li>another solution is to add an</li>...<div
class=clear></div> <a
href="http://beerpla.net/2008/04/17/mysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ul>]]></description> <content:encoded><![CDATA[<ul><li><a
href="http://en.oreilly.com/mysql2008/public/schedule/speaker/1218">Damien Seguy</a> of Nexen Services presents</li><li>easiest session of all (phew, that&#039;s a relief)</li><li>clever SQL recipes</li><li>tweaking SQL queries</li><li>shows an example where SELECT is ORDERED by a column that is actually an enum.</li><ul><li>an enum is both a string and a number</li><li>sorted by number</li><li>displayed as string</li><li>can be sorted by string if it&#039;s cast as string</li></ul><li>compact column</li><ul><li>compacts storage</li><li>faster to search</li><li>if (var)char is turned into enum, some space can be saved, shows example</li></ul><li>random order</li><ul><li>order by rand(1) &#8211; obviously</li><li>the integer parameter is actually a seed</li><li>really slow, also obviously, especially for larger tables because it has to order first, then apply rand() to the list</li><li>another solution is to add an extra column, put random values into it, and add index, then</li><ul><li>UPDATE tbl SET chaos=RAND();</li></ul><li>random extraction</li><ul><li>SELECT id, col FROM tbl JOIN <br
/>&nbsp; (SELECT CEIL(RAND() *<br
/>&nbsp;&nbsp;&nbsp; (SELECT MAX(id) FROM tbl)) AS r)<br
/>AS r2 ON id=r;</li></ul><li><strong>for multiple rows, Damien offers a solution involving an integer table (see his own slides). This solution is supposed to be really fast.</strong></li></ul><li>integer table</li><ul><li>generate a table with only 10 integers</li><li>do cross joins to get 100, 10,000, etc integers</li><li>10mil rows takes only 13 seconds (on his laptop), then either store it in another table or just use the result set</li><li>yet again, code is shows, so see slides</li></ul><li>generating alphabet</li><ul><li>shows a handy query</li></ul><li>generating text</li><ul><li>offers a long query that uses ELT(), CONCAT(), and RAND() (see slides)</li><li>a SELECT that builds words uses GROUP_CONCAT()</li><li>looks pretty useful</li></ul><li>ASCII art</li><ul><li>SELECT version, REPEAT(&#039;*&#039;, percentage * 2) AS bars FROM php_versions;</li><li>shows a nifty result set with stars as fillers in percentage bars</li><li>shows another result set, similar to the one above, with spaces as fillers and stars at the end</li><li>shows another example that looks like some sort of a spaceship, from mysql forge</li></ul><li>GROUP_CONCAT (can I get a woot? I love this function)</li><ul><li>CONCAT() and CONCAT_WS() now for groups</li><li>ORDER BY</li><li>SEPARATOR</li><li>limited to 1kb by default, change group_concat_max_len</li><li>shows example (see slides)</li></ul><li>how to get a second to last value?</li><ul><li>uses GROUP_CONCAT, looks horribly long and inefficient, there has to be a better way</li><li>somebody suggests using ORDER BY with LIMIT</li></ul><li>rankings</li><ul><li>uses MySQL vars</li><li>not as many people as I thought seem to know about it, judging by the low amount of raised hands</li><li>SET @var:=3</li><li>SELECT @var;</li><li>variables are not shared between connections, destroyed at the end of the connection</li><li>uses LEAST()</li><li>see slides</li></ul><li>agile loading</li><ul><li>SET @i:=0</li><li>LOAD DATA INFILE &#039;/tmp/stats.txt&#039;<br
/>INTO TABLE statPHPload<br
/>&nbsp; (@date, @php, @country, @continent)<br
/>SET<br
/>&nbsp; id = 0,<br
/>&nbsp; period = date(STR_TO_DATE(@date, &#039;%d-%b-%y&#039;)),<br
/>&nbsp; rank = (@i := @i + 1),<br
/>&nbsp; php = CAST(REPLACE(@php, &#039;,&#039;, &#039;.&#039;) AS DECIMAL),<br
/>&nbsp; country = @country;</li></ul></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+MySQL+Hidden+Treasures+%28Thursday+11%3A55PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm/&amp;notes=%20Damien%20Seguy%20of%20Nexen%20Services%20presents%20easiest%20session%20of%20all%20%28phew%2C%20that%27s%20a%20relief%29%20clever%20SQL%20recipes%20tweaking%20SQL%20queries%20shows%20an%20example%20where%20SELECT%20is%20ORDERED%20by%20a%20column%20that%20is%20actually%20an%20enum.%20%20an%20enum%20is%20both%20a%20string%20and%20a%20number%20sorted%20by%20number%20displayed%20as%20string%20can%20be%20sorted%20by%20&amp;short_link=http://bit.ly/b8pJx6&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+MySQL+Hidden+Treasures+%28Thursday+11%3A55PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm/&amp;notes=%20Damien%20Seguy%20of%20Nexen%20Services%20presents%20easiest%20session%20of%20all%20%28phew%2C%20that%27s%20a%20relief%29%20clever%20SQL%20recipes%20tweaking%20SQL%20queries%20shows%20an%20example%20where%20SELECT%20is%20ORDERED%20by%20a%20column%20that%20is%20actually%20an%20enum.%20%20an%20enum%20is%20both%20a%20string%20and%20a%20number%20sorted%20by%20number%20displayed%20as%20string%20can%20be%20sorted%20by%20&amp;short_link=http://bit.ly/b8pJx6&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+MySQL+Hidden+Treasures+%28Thursday+11%3A55PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm/&amp;notes=%20Damien%20Seguy%20of%20Nexen%20Services%20presents%20easiest%20session%20of%20all%20%28phew%2C%20that%27s%20a%20relief%29%20clever%20SQL%20recipes%20tweaking%20SQL%20queries%20shows%20an%20example%20where%20SELECT%20is%20ORDERED%20by%20a%20column%20that%20is%20actually%20an%20enum.%20%20an%20enum%20is%20both%20a%20string%20and%20a%20number%20sorted%20by%20number%20displayed%20as%20string%20can%20be%20sorted%20by%20&amp;short_link=http://bit.ly/b8pJx6&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+MySQL+Hidden+Treasures+%28Thursday+11%3A55PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm/&amp;notes=%20Damien%20Seguy%20of%20Nexen%20Services%20presents%20easiest%20session%20of%20all%20%28phew%2C%20that%27s%20a%20relief%29%20clever%20SQL%20recipes%20tweaking%20SQL%20queries%20shows%20an%20example%20where%20SELECT%20is%20ORDERED%20by%20a%20column%20that%20is%20actually%20an%20enum.%20%20an%20enum%20is%20both%20a%20string%20and%20a%20number%20sorted%20by%20number%20displayed%20as%20string%20can%20be%20sorted%20by%20&amp;short_link=http://bit.ly/b8pJx6&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+MySQL+Hidden+Treasures+%28Thursday+11%3A55PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm/&amp;notes=%20Damien%20Seguy%20of%20Nexen%20Services%20presents%20easiest%20session%20of%20all%20%28phew%2C%20that%27s%20a%20relief%29%20clever%20SQL%20recipes%20tweaking%20SQL%20queries%20shows%20an%20example%20where%20SELECT%20is%20ORDERED%20by%20a%20column%20that%20is%20actually%20an%20enum.%20%20an%20enum%20is%20both%20a%20string%20and%20a%20number%20sorted%20by%20number%20displayed%20as%20string%20can%20be%20sorted%20by%20&amp;short_link=http://bit.ly/b8pJx6&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+MySQL+Hidden+Treasures+%28Thursday+11%3A55PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm/&amp;notes=%20Damien%20Seguy%20of%20Nexen%20Services%20presents%20easiest%20session%20of%20all%20%28phew%2C%20that%27s%20a%20relief%29%20clever%20SQL%20recipes%20tweaking%20SQL%20queries%20shows%20an%20example%20where%20SELECT%20is%20ORDERED%20by%20a%20column%20that%20is%20actually%20an%20enum.%20%20an%20enum%20is%20both%20a%20string%20and%20a%20number%20sorted%20by%20number%20displayed%20as%20string%20can%20be%20sorted%20by%20&amp;short_link=http://bit.ly/b8pJx6&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+MySQL+Hidden+Treasures+%28Thursday+11%3A55PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm/&amp;notes=%20Damien%20Seguy%20of%20Nexen%20Services%20presents%20easiest%20session%20of%20all%20%28phew%2C%20that%27s%20a%20relief%29%20clever%20SQL%20recipes%20tweaking%20SQL%20queries%20shows%20an%20example%20where%20SELECT%20is%20ORDERED%20by%20a%20column%20that%20is%20actually%20an%20enum.%20%20an%20enum%20is%20both%20a%20string%20and%20a%20number%20sorted%20by%20number%20displayed%20as%20string%20can%20be%20sorted%20by%20&amp;short_link=http://bit.ly/b8pJx6&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%20MySQL%20Hidden%20Treasures%20%28Thursday%2011%3A55PM%29&amp;link=http://beerpla.net/2008/04/17/mysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm/&amp;notes=%20Damien%20Seguy%20of%20Nexen%20Services%20presents%20easiest%20session%20of%20all%20%28phew%2C%20that%27s%20a%20relief%29%20clever%20SQL%20recipes%20tweaking%20SQL%20queries%20shows%20an%20example%20where%20SELECT%20is%20ORDERED%20by%20a%20column%20that%20is%20actually%20an%20enum.%20%20an%20enum%20is%20both%20a%20string%20and%20a%20number%20sorted%20by%20number%20displayed%20as%20string%20can%20be%20sorted%20by%20&amp;short_link=http://bit.ly/b8pJx6&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/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: EXPLAIN Demystified (Tuesday 2:00PM)</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/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/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/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/" rel="bookmark" title="April 17, 2008">MySQL Conference Liveblogging: Optimizing MySQL For High Volume Data Logging Applications (Thursday 2:50PM)</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%2F17%2Fmysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm%2F&amp;title=MySQL%20Conference%20Liveblogging%3A%20MySQL%20Hidden%20Treasures%20%28Thursday%2011%3A55PM%29" id="wpa2a_28"><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/17/mysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>MySQL Conference Liveblogging: Monitoring Tools (Wednesday 5:15PM)</title><link>http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/</link> <comments>http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/#comments</comments> <pubDate>Thu, 17 Apr 2008 00:20:57 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[cacti]]></category> <category><![CDATA[conference]]></category> <category><![CDATA[fiveruns]]></category> <category><![CDATA[heartbeat]]></category> <category><![CDATA[hyperic]]></category> <category><![CDATA[innotop]]></category> <category><![CDATA[mon]]></category> <category><![CDATA[monitoring]]></category> <category><![CDATA[monyog]]></category> <category><![CDATA[moodss]]></category> <category><![CDATA[mtstat]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[mysqladmin]]></category> <category><![CDATA[mytop]]></category> <category><![CDATA[nagios]]></category> <category><![CDATA[nagiosql]]></category> <category><![CDATA[sqlyog]]></category> <category><![CDATA[tool]]></category> <category><![CDATA[webyog]]></category> <category><![CDATA[zabbix]]></category> <category><![CDATA[zenoss]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/</guid> <description><![CDATA[<ul><li>Tom Hanlon of MySQL presents</li><li>monitoring tool basics<ul><li>SHOW FULL PROCESSLIST</li><li>SHOW GLOBAL STATUS</li><li>SHOW GLOBAL VARIABLES</li></ul></li><li>basic tools<ul><li>mysqladmin is provided with the server<ul><li>mysqladmin -i 10 extended status: will repeat the same command every 10 seconds. Pipe through grep &#034;and smoke it&#034; (<em>bad pun, hah hah</em>)</li><li>-r: show only changed values</li></ul></li><li>MySQL Administrator</li></ul></li><li>cacti<ul><li>rrdtool based network graphing tool</li><li>uses snmp</li><li>PHP apache and MySQL based solution</li><li>MySQL plugins, download and install</li><li>&#034;poller&#034; gathers data and populates the graphs</li><li>someone offers <a
href="http://munin.projects.linpro.no/">munin</a> as an alternative<ul><li>not snmp based, its own agent is used</li></ul></li><li>pros<ul><li>cacti is fairly easy to configure</li></ul></li><li>cons<ul><li>could be CPU intensive with lots of machines (<em>Perl polling seems to be the </em></li></ul></li></ul></li>...<div
class=clear></div> <a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ul>]]></description> <content:encoded><![CDATA[<ul><li>Tom Hanlon of MySQL presents</li><li>monitoring tool basics<ul><li>SHOW FULL PROCESSLIST</li><li>SHOW GLOBAL STATUS</li><li>SHOW GLOBAL VARIABLES</li></ul></li><li>basic tools<ul><li>mysqladmin is provided with the server<ul><li>mysqladmin -i 10 extended status: will repeat the same command every 10 seconds. Pipe through grep &#034;and smoke it&#034; (<em>bad pun, hah hah</em>)</li><li>-r: show only changed values</li></ul></li><li>MySQL Administrator</li></ul></li><li>cacti<ul><li>rrdtool based network graphing tool</li><li>uses snmp</li><li>PHP apache and MySQL based solution</li><li>MySQL plugins, download and install</li><li>&#034;poller&#034; gathers data and populates the graphs</li><li>someone offers <a
href="http://munin.projects.linpro.no/">munin</a> as an alternative<ul><li>not snmp based, its own agent is used</li></ul></li><li>pros<ul><li>cacti is fairly easy to configure</li></ul></li><li>cons<ul><li>could be CPU intensive with lots of machines (<em>Perl polling seems to be the problem</em>)</li></ul></li></ul></li><li>zenoss<ul><li>complete network monitoring tool</li><li>AJAX, integrated with Google Maps (<em>if you don&#039;t know where the servers are, everyone laughs at this comment)</em></li></ul></li><li>innotop<ul><li>monitoring innodb, complex output</li><li>developed by Baron Schwartz</li></ul></li><li><a
href="http://jeremy.zawodny.com/mysql/mytop/">mytop</a><ul><li>similar to Linux&#039;s top</li><li>filter connections on database/host being used</li><li>queries per sec</li></ul></li><li><a
href="https://launchpad.net/mtstat">mtstat-mysql</a><ul><li>plugin for the system monitoring tool <a
href="https://launchpad.net/mtstat">mtstat</a></li><li><a
href="https://launchpad.net/mtstat">mtstat</a> provides functionality of vmstat and iostat tools to monitor system activity</li></ul></li><li><a
href="http://www.nagios.org/">nagios</a><ul><li>nagios is more of a notification tool, although it can do graphs</li><li>pain to set up, text config files, but still the most widely used tool, should be better in upcoming versions</li><li><a
title="http://www.nagiosql.org/" href="http://www.nagiosql.org/">NagiosQL</a> is a front end tool for nagios administration (<em>somebody from the audience pointed this out, that&#039;s completely new to me!</em>)</li><li><em>I offer <a
href="http://www.zabbix.com/">zabbix</a> as an alternative</em></li><li><em><a
href="http://www.hyperic.com/"><strong>hyperic</strong></a><strong> is another, apparently very easy to set up, with service autodiscovery</strong></em></li></ul></li><li><a
href="http://www.mysql.com/products/enterprise/monitor.html">MySQL Enterprise Monitor</a> (not free)<ul><li>graphs, monitoring, GUI</li><li>built by MySQL folks themselves</li><li>agent based</li><li>well organized</li></ul></li><li><em><a
href="http://www.webyog.com/">webyog</a>, <a
href="http://www.webyog.com/">sqlyog</a>, <a
href="http://www.webyog.com/">monyog</a>, <a
href="http://mon.wiki.kernel.org/index.php/Main_Page">mon</a>, <a
href="http://www.linux-ha.org/Heartbeat">heartbeat</a>, <a
href="http://moodss.sourceforge.net/">moodss</a>, <a
href="http://www.fiveruns.com/products">fiveruns</a> are added by the audience members</em></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+Monitoring+Tools+%28Wednesday+5%3A15PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/&amp;notes=%0D%0A%09Tom%20Hanlon%20of%20MySQL%20presents%0D%0A%09monitoring%20tool%20basics%0D%0A%0D%0A%09SHOW%20FULL%20PROCESSLIST%0D%0A%09SHOW%20GLOBAL%20STATUS%0D%0A%09SHOW%20GLOBAL%20VARIABLES%0D%0A%0D%0A%0D%0A%09basic%20tools%0D%0A%0D%0A%09mysqladmin%20is%20provided%20with%20the%20server%0D%0A%0D%0A%09mysqladmin%20-i%2010%20extended%20status%3A%20will%20repeat%20the%20same%20command%20every%2010%20seconds.%20Pipe%20through%20grep%20%22and%20smo&amp;short_link=http://bit.ly/aIhehf&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+Monitoring+Tools+%28Wednesday+5%3A15PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/&amp;notes=%0D%0A%09Tom%20Hanlon%20of%20MySQL%20presents%0D%0A%09monitoring%20tool%20basics%0D%0A%0D%0A%09SHOW%20FULL%20PROCESSLIST%0D%0A%09SHOW%20GLOBAL%20STATUS%0D%0A%09SHOW%20GLOBAL%20VARIABLES%0D%0A%0D%0A%0D%0A%09basic%20tools%0D%0A%0D%0A%09mysqladmin%20is%20provided%20with%20the%20server%0D%0A%0D%0A%09mysqladmin%20-i%2010%20extended%20status%3A%20will%20repeat%20the%20same%20command%20every%2010%20seconds.%20Pipe%20through%20grep%20%22and%20smo&amp;short_link=http://bit.ly/aIhehf&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+Monitoring+Tools+%28Wednesday+5%3A15PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/&amp;notes=%0D%0A%09Tom%20Hanlon%20of%20MySQL%20presents%0D%0A%09monitoring%20tool%20basics%0D%0A%0D%0A%09SHOW%20FULL%20PROCESSLIST%0D%0A%09SHOW%20GLOBAL%20STATUS%0D%0A%09SHOW%20GLOBAL%20VARIABLES%0D%0A%0D%0A%0D%0A%09basic%20tools%0D%0A%0D%0A%09mysqladmin%20is%20provided%20with%20the%20server%0D%0A%0D%0A%09mysqladmin%20-i%2010%20extended%20status%3A%20will%20repeat%20the%20same%20command%20every%2010%20seconds.%20Pipe%20through%20grep%20%22and%20smo&amp;short_link=http://bit.ly/aIhehf&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+Monitoring+Tools+%28Wednesday+5%3A15PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/&amp;notes=%0D%0A%09Tom%20Hanlon%20of%20MySQL%20presents%0D%0A%09monitoring%20tool%20basics%0D%0A%0D%0A%09SHOW%20FULL%20PROCESSLIST%0D%0A%09SHOW%20GLOBAL%20STATUS%0D%0A%09SHOW%20GLOBAL%20VARIABLES%0D%0A%0D%0A%0D%0A%09basic%20tools%0D%0A%0D%0A%09mysqladmin%20is%20provided%20with%20the%20server%0D%0A%0D%0A%09mysqladmin%20-i%2010%20extended%20status%3A%20will%20repeat%20the%20same%20command%20every%2010%20seconds.%20Pipe%20through%20grep%20%22and%20smo&amp;short_link=http://bit.ly/aIhehf&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+Monitoring+Tools+%28Wednesday+5%3A15PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/&amp;notes=%0D%0A%09Tom%20Hanlon%20of%20MySQL%20presents%0D%0A%09monitoring%20tool%20basics%0D%0A%0D%0A%09SHOW%20FULL%20PROCESSLIST%0D%0A%09SHOW%20GLOBAL%20STATUS%0D%0A%09SHOW%20GLOBAL%20VARIABLES%0D%0A%0D%0A%0D%0A%09basic%20tools%0D%0A%0D%0A%09mysqladmin%20is%20provided%20with%20the%20server%0D%0A%0D%0A%09mysqladmin%20-i%2010%20extended%20status%3A%20will%20repeat%20the%20same%20command%20every%2010%20seconds.%20Pipe%20through%20grep%20%22and%20smo&amp;short_link=http://bit.ly/aIhehf&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+Monitoring+Tools+%28Wednesday+5%3A15PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/&amp;notes=%0D%0A%09Tom%20Hanlon%20of%20MySQL%20presents%0D%0A%09monitoring%20tool%20basics%0D%0A%0D%0A%09SHOW%20FULL%20PROCESSLIST%0D%0A%09SHOW%20GLOBAL%20STATUS%0D%0A%09SHOW%20GLOBAL%20VARIABLES%0D%0A%0D%0A%0D%0A%09basic%20tools%0D%0A%0D%0A%09mysqladmin%20is%20provided%20with%20the%20server%0D%0A%0D%0A%09mysqladmin%20-i%2010%20extended%20status%3A%20will%20repeat%20the%20same%20command%20every%2010%20seconds.%20Pipe%20through%20grep%20%22and%20smo&amp;short_link=http://bit.ly/aIhehf&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+Monitoring+Tools+%28Wednesday+5%3A15PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/&amp;notes=%0D%0A%09Tom%20Hanlon%20of%20MySQL%20presents%0D%0A%09monitoring%20tool%20basics%0D%0A%0D%0A%09SHOW%20FULL%20PROCESSLIST%0D%0A%09SHOW%20GLOBAL%20STATUS%0D%0A%09SHOW%20GLOBAL%20VARIABLES%0D%0A%0D%0A%0D%0A%09basic%20tools%0D%0A%0D%0A%09mysqladmin%20is%20provided%20with%20the%20server%0D%0A%0D%0A%09mysqladmin%20-i%2010%20extended%20status%3A%20will%20repeat%20the%20same%20command%20every%2010%20seconds.%20Pipe%20through%20grep%20%22and%20smo&amp;short_link=http://bit.ly/aIhehf&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%20Monitoring%20Tools%20%28Wednesday%205%3A15PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/&amp;notes=%0D%0A%09Tom%20Hanlon%20of%20MySQL%20presents%0D%0A%09monitoring%20tool%20basics%0D%0A%0D%0A%09SHOW%20FULL%20PROCESSLIST%0D%0A%09SHOW%20GLOBAL%20STATUS%0D%0A%09SHOW%20GLOBAL%20VARIABLES%0D%0A%0D%0A%0D%0A%09basic%20tools%0D%0A%0D%0A%09mysqladmin%20is%20provided%20with%20the%20server%0D%0A%0D%0A%09mysqladmin%20-i%2010%20extended%20status%3A%20will%20repeat%20the%20same%20command%20every%2010%20seconds.%20Pipe%20through%20grep%20%22and%20smo&amp;short_link=http://bit.ly/aIhehf&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-benchmarking-tools-wednesday-425pm/" rel="bookmark" title="April 16, 2008">MySQL Conference Liveblogging: Benchmarking Tools (Wednesday 4:25PM)</a></li><li><a
href="http://beerpla.net/2008/12/19/monitor-all-your-domains-from-one-location/" rel="bookmark" title="December 19, 2008">Monitor All Your Domains From One Location</a></li><li><a
href="http://beerpla.net/2008/03/25/navicat-for-mysql-bugs-filed/" rel="bookmark" title="March 25, 2008">Navicat For MySQL Bugs Filed</a></li><li><a
href="http://beerpla.net/2008/03/24/mysql-conference-2008/" rel="bookmark" title="March 24, 2008">MySQL Conference 2008</a></li><li><a
href="http://beerpla.net/2008/04/17/mysql-conference-liveblogging-optimizing-mysql-for-high-volume-data-logging-applications-thursday-250pm/" rel="bookmark" title="April 17, 2008">MySQL Conference Liveblogging: Optimizing MySQL For High Volume Data Logging Applications (Thursday 2:50PM)</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%2F16%2Fmysql-conference-liveblogging-monitoring-tools-wednesday-515pm%2F&amp;title=MySQL%20Conference%20Liveblogging%3A%20Monitoring%20Tools%20%28Wednesday%205%3A15PM%29" id="wpa2a_30"><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/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>MySQL Conference Liveblogging: Benchmarking Tools (Wednesday 4:25PM)</title><link>http://beerpla.net/2008/04/16/mysql-conference-liveblogging-benchmarking-tools-wednesday-425pm/</link> <comments>http://beerpla.net/2008/04/16/mysql-conference-liveblogging-benchmarking-tools-wednesday-425pm/#comments</comments> <pubDate>Wed, 16 Apr 2008 23:36:18 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[benchmark]]></category> <category><![CDATA[conference]]></category> <category><![CDATA[monitor]]></category> <category><![CDATA[MySQL]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/04/16/mysql-conference-liveblogging-benchmarking-tools-wednesday-425pm/</guid> <description><![CDATA[<ul><li>Tom Hanlon of MySQL presents</li><li>Benchmarking tools<ul><li><a
href="http://dev.mysql.com/doc/refman/5.1/en/mysqlslap.html">mysqlslap</a> (with MySQL 5.1)</li><li><a
href="http://dev.mysql.com/doc/refman/5.0/en/mysql-benchmarks.html">sql-bench</a></li><li><a
href="http://jeremy.zawodny.com/mysql/super-smack/">supersmack</a> &#8211; Jeremy Zawodny&#039;s tool</li><li><a
href="http://httpd.apache.org/docs/1.3/programs/ab.html">Apache Bench</a> (combined with some sample PHP scripts)</li><li>MySQL&#039;s <a
href="http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_benchmark">benchmark()</a> function</li><li><a
href="http://jeremy.zawodny.com/mysql/mybench/">mybench</a></li><li><a
href="http://www.microsoft.com/technet/archive/itsolutions/intranet/downloads/webstres.mspx">WAST</a></li><li><a
href="http://jakarta.apache.org/jmeter/">JMeter</a></li></ul></li><li>sql-bench<ul><li>pros<ul><li>ubiquitous</li><li>long history of use</li></ul></li><li>cons<ul><li>single thread</li><li>Perl</li><li>not always real-life test cases (create 10k tables?)</li></ul></li><li>list of tests follows</li></ul></li><li>supersmack<ul><li>configurable, flexible</li><li>1000 queries, 50 users<ul><li>super-smack -d mysql select-key-smack 50 1000</li></ul></li><li>can modify queries to be closer to what your own application uses</li><li>pros<ul><li>benches concurrent connections</li><li>well documented</li></ul></li><li>cons<ul><li>test language sucks</li></ul></li></ul></li><li>Apache Bench<ul><li>webserver benchmarking tool</li><li>point to a webserver, utilizes concurrent users</li><li>siege, httperf, httpload are similar</li><li>404 errors deliver really quickly, so make sure to check for those</li></ul></li><li>benchmark()<ul><li>tests</li></ul></li>...<div
class=clear></div> <a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-benchmarking-tools-wednesday-425pm/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ul>]]></description> <content:encoded><![CDATA[<ul><li>Tom Hanlon of MySQL presents<li>Benchmarking tools<ul><li><a
href="http://dev.mysql.com/doc/refman/5.1/en/mysqlslap.html">mysqlslap</a> (with MySQL 5.1)<li><a
href="http://dev.mysql.com/doc/refman/5.0/en/mysql-benchmarks.html">sql-bench</a><li><a
href="http://jeremy.zawodny.com/mysql/super-smack/">supersmack</a> &#8211; Jeremy Zawodny&#039;s tool<li><a
href="http://httpd.apache.org/docs/1.3/programs/ab.html">Apache Bench</a> (combined with some sample PHP scripts)<li>MySQL&#039;s <a
href="http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_benchmark">benchmark()</a> function<li><a
href="http://jeremy.zawodny.com/mysql/mybench/">mybench</a><li><a
href="http://www.microsoft.com/technet/archive/itsolutions/intranet/downloads/webstres.mspx">WAST</a><li><a
href="http://jakarta.apache.org/jmeter/">JMeter</a></li></ul><li>sql-bench<ul><li>pros<ul><li>ubiquitous<li>long history of use</li></ul><li>cons<ul><li>single thread<li>Perl<li>not always real-life test cases (create 10k tables?)</li></ul><li>list of tests follows</li></ul><li>supersmack<ul><li>configurable, flexible<li>1000 queries, 50 users<ul><li>super-smack -d mysql select-key-smack 50 1000</li></ul><li>can modify queries to be closer to what your own application uses<li>pros<ul><li>benches concurrent connections<li>well documented</li></ul><li>cons<ul><li>test language sucks</li></ul></li></ul><li>Apache Bench<ul><li>webserver benchmarking tool<li>point to a webserver, utilizes concurrent users<li>siege, httperf, httpload are similar<li>404 errors deliver really quickly, so make sure to check for those</li></ul><li>benchmark()<ul><li>tests MySQL&#039;s internal functions<li>SELECT BENCHMARK(10000, SHA1(MD5(rand())));<li>pros<ul><li>simple to use</li></ul><li>cons<ul><li>only benchmarks functions, can be overcome (see next)</li></ul><li>creative use: write your own queries as functions and then run benchmark() on them</li></ul><li>MyBench<ul><li>simple</li></ul><li>WAST<ul><li>pros<ul><li>flexible<li>easy to use (GUI)<li>replay example click trail from browsing</li></ul><li>cons<ul><li>Windows only</li></ul></li></ul><li>Jmeter<ul><li>Java based app for testing web applications<li>hard to built tests but once you do, they run really well<li>configuration done using test plans, which is more involved than just typing a cmd line<li>can output tables, graphs<li>can be configured to run endlessly, as background noise<li>good documentation<li>flexible</li></ul><li>mysqlslap<ul><li>internally developed benchmark tool<li>ships with 5.1<li>feature rich<li>mysqlslap &#8211;user=john<li>&#8211;auto-generate-sql<br
/>or<br
/>&#8211;query=&#034;select blabla &#8230;&#034; or &#8211;query=file<li>&#8211;concurrency=100<li>&#8211;iterations=5<li>&#8211;engine=myisam</li></ul><li>audience members additionally mention <a
href="http://grinder.sourceforge.net/">grinder</a>, <a
href="http://opensta.org/">openSTA</a>, <a
href="http://developer.yahoo.com/yslow/">yslow</a> (ties in with FireBug), <a
href="http://selenium.openqa.org/">selenium</a></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+Benchmarking+Tools+%28Wednesday+4%3A25PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-benchmarking-tools-wednesday-425pm/&amp;notes=%20Tom%20Hanlon%20of%20MySQL%20presents%20%20Benchmarking%20tools%20%20%20mysqlslap%20%28with%20MySQL%205.1%29%20%20sql-bench%20%20supersmack%20-%20Jeremy%20Zawodny%27s%20tool%20%20Apache%20Bench%20%28combined%20with%20some%20sample%20PHP%20scripts%29%20%20MySQL%27s%20benchmark%28%29%20function%20%20mybench%20%20WAST%20%20JMeter%20sql-bench%20%20%20pros%20%20%20ubiquitous%20%20long%20history%20of%20use%20cons%20%20%20single%20th&amp;short_link=http://bit.ly/a1iESD&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+Benchmarking+Tools+%28Wednesday+4%3A25PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-benchmarking-tools-wednesday-425pm/&amp;notes=%20Tom%20Hanlon%20of%20MySQL%20presents%20%20Benchmarking%20tools%20%20%20mysqlslap%20%28with%20MySQL%205.1%29%20%20sql-bench%20%20supersmack%20-%20Jeremy%20Zawodny%27s%20tool%20%20Apache%20Bench%20%28combined%20with%20some%20sample%20PHP%20scripts%29%20%20MySQL%27s%20benchmark%28%29%20function%20%20mybench%20%20WAST%20%20JMeter%20sql-bench%20%20%20pros%20%20%20ubiquitous%20%20long%20history%20of%20use%20cons%20%20%20single%20th&amp;short_link=http://bit.ly/a1iESD&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+Benchmarking+Tools+%28Wednesday+4%3A25PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-benchmarking-tools-wednesday-425pm/&amp;notes=%20Tom%20Hanlon%20of%20MySQL%20presents%20%20Benchmarking%20tools%20%20%20mysqlslap%20%28with%20MySQL%205.1%29%20%20sql-bench%20%20supersmack%20-%20Jeremy%20Zawodny%27s%20tool%20%20Apache%20Bench%20%28combined%20with%20some%20sample%20PHP%20scripts%29%20%20MySQL%27s%20benchmark%28%29%20function%20%20mybench%20%20WAST%20%20JMeter%20sql-bench%20%20%20pros%20%20%20ubiquitous%20%20long%20history%20of%20use%20cons%20%20%20single%20th&amp;short_link=http://bit.ly/a1iESD&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+Benchmarking+Tools+%28Wednesday+4%3A25PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-benchmarking-tools-wednesday-425pm/&amp;notes=%20Tom%20Hanlon%20of%20MySQL%20presents%20%20Benchmarking%20tools%20%20%20mysqlslap%20%28with%20MySQL%205.1%29%20%20sql-bench%20%20supersmack%20-%20Jeremy%20Zawodny%27s%20tool%20%20Apache%20Bench%20%28combined%20with%20some%20sample%20PHP%20scripts%29%20%20MySQL%27s%20benchmark%28%29%20function%20%20mybench%20%20WAST%20%20JMeter%20sql-bench%20%20%20pros%20%20%20ubiquitous%20%20long%20history%20of%20use%20cons%20%20%20single%20th&amp;short_link=http://bit.ly/a1iESD&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+Benchmarking+Tools+%28Wednesday+4%3A25PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-benchmarking-tools-wednesday-425pm/&amp;notes=%20Tom%20Hanlon%20of%20MySQL%20presents%20%20Benchmarking%20tools%20%20%20mysqlslap%20%28with%20MySQL%205.1%29%20%20sql-bench%20%20supersmack%20-%20Jeremy%20Zawodny%27s%20tool%20%20Apache%20Bench%20%28combined%20with%20some%20sample%20PHP%20scripts%29%20%20MySQL%27s%20benchmark%28%29%20function%20%20mybench%20%20WAST%20%20JMeter%20sql-bench%20%20%20pros%20%20%20ubiquitous%20%20long%20history%20of%20use%20cons%20%20%20single%20th&amp;short_link=http://bit.ly/a1iESD&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+Benchmarking+Tools+%28Wednesday+4%3A25PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-benchmarking-tools-wednesday-425pm/&amp;notes=%20Tom%20Hanlon%20of%20MySQL%20presents%20%20Benchmarking%20tools%20%20%20mysqlslap%20%28with%20MySQL%205.1%29%20%20sql-bench%20%20supersmack%20-%20Jeremy%20Zawodny%27s%20tool%20%20Apache%20Bench%20%28combined%20with%20some%20sample%20PHP%20scripts%29%20%20MySQL%27s%20benchmark%28%29%20function%20%20mybench%20%20WAST%20%20JMeter%20sql-bench%20%20%20pros%20%20%20ubiquitous%20%20long%20history%20of%20use%20cons%20%20%20single%20th&amp;short_link=http://bit.ly/a1iESD&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+Benchmarking+Tools+%28Wednesday+4%3A25PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-benchmarking-tools-wednesday-425pm/&amp;notes=%20Tom%20Hanlon%20of%20MySQL%20presents%20%20Benchmarking%20tools%20%20%20mysqlslap%20%28with%20MySQL%205.1%29%20%20sql-bench%20%20supersmack%20-%20Jeremy%20Zawodny%27s%20tool%20%20Apache%20Bench%20%28combined%20with%20some%20sample%20PHP%20scripts%29%20%20MySQL%27s%20benchmark%28%29%20function%20%20mybench%20%20WAST%20%20JMeter%20sql-bench%20%20%20pros%20%20%20ubiquitous%20%20long%20history%20of%20use%20cons%20%20%20single%20th&amp;short_link=http://bit.ly/a1iESD&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%20Benchmarking%20Tools%20%28Wednesday%204%3A25PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-benchmarking-tools-wednesday-425pm/&amp;notes=%20Tom%20Hanlon%20of%20MySQL%20presents%20%20Benchmarking%20tools%20%20%20mysqlslap%20%28with%20MySQL%205.1%29%20%20sql-bench%20%20supersmack%20-%20Jeremy%20Zawodny%27s%20tool%20%20Apache%20Bench%20%28combined%20with%20some%20sample%20PHP%20scripts%29%20%20MySQL%27s%20benchmark%28%29%20function%20%20mybench%20%20WAST%20%20JMeter%20sql-bench%20%20%20pros%20%20%20ubiquitous%20%20long%20history%20of%20use%20cons%20%20%20single%20th&amp;short_link=http://bit.ly/a1iESD&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/2007/10/12/sysbench-linux-test-bench/" rel="bookmark" title="October 12, 2007">sysbench &#8211; Linux Test Bench</a></li><li><a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/" rel="bookmark" title="April 16, 2008">MySQL Conference Liveblogging: Monitoring Tools (Wednesday 5:15PM)</a></li><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/03/25/navicat-for-mysql-bugs-filed/" rel="bookmark" title="March 25, 2008">Navicat For MySQL Bugs Filed</a></li><li><a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-portable-scale-out-benchmarks-for-mysql-wednesday-1050am/" rel="bookmark" title="April 16, 2008">MySQL Conference Liveblogging: Portable Scale-out Benchmarks For MySQL (Wednesday 10:50AM)</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%2F16%2Fmysql-conference-liveblogging-benchmarking-tools-wednesday-425pm%2F&amp;title=MySQL%20Conference%20Liveblogging%3A%20Benchmarking%20Tools%20%28Wednesday%204%3A25PM%29" id="wpa2a_32"><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/16/mysql-conference-liveblogging-benchmarking-tools-wednesday-425pm/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>MySQL &#8211; Sun &#8211; Flickr &#8211; Fotolog &#8211; Wikipedia &#8211; Facebook &#8211; YouTube Comparison &#8211; MySQL Conference Day 2 Keynote</title><link>http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/</link> <comments>http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/#comments</comments> <pubDate>Wed, 16 Apr 2008 23:07:23 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[facebook]]></category> <category><![CDATA[flickr]]></category> <category><![CDATA[fotolog]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[sun]]></category> <category><![CDATA[wikipedia]]></category> <category><![CDATA[youtube]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/</guid> <description><![CDATA[<p>Unfortunately I didn&#039;t find any available seats to take notes for this but this morning a very interesting keynote took place. Representatives from 7 large companies mentioned in the title gathered on stage and answered various questions by MySQL&#039;s Kaj Arno.</p><p>These questions included things like &#034;how many MySQL servers do you have&#034;, &#034;how many DBAs&#034;, etc. It was a lot of fun, hopefully someone (Sheeri) will edit and post the video soon.</p><p>Keith has a nice summary of everything that went on together with the numbers <a
href="http://www.paragon-cs.com/wordpress/?p=144">here</a>.</p><p><strong>Update: </strong>Venu has even better notes <a
href="http://venublog.com/2008/04/16/notes-from-scaling-mysql-up-or-out/">here</a>.</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+-+Sun+-+Flickr+-+Fotolog+-+Wikipedia+-+Facebook+-+YouTube+Comparison+-+MySQL+Conference+Day+2+Keynote&#38;link=http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/&#38;notes=Unfortunately%20I%20didn%27t%20find%20any%20available%20seats%20to%20take%20notes%20for%20this%20but%20this%20morning%20a%20very%20interesting%20keynote%20took%20place.%20Representatives%20from%207%20large%20companies%20mentioned%20in%20the%20title%20gathered%20on%20stage%20and%20answered%20various%20questions%20by%20MySQL%27s%20Kaj%20Arno.%20These%20questions%20included%20things%20like%20%22how&#38;short_link=http://bit.ly/8XxJIk&#38;v=1&#38;apitype=1&#38;apikey=8afa39428933be41f8afdb8ea21a495c&#38;source=Shareaholic&#38;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&#38;service=7&#38;tags=&#38;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+-+Sun+-+Flickr+-+Fotolog+-+Wikipedia+-+Facebook+-+YouTube+Comparison+-+MySQL+Conference+Day+2+Keynote&#38;link=http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/&#38;notes=Unfortunately%20I%20didn%27t%20find%20any%20available%20seats%20to%20take%20notes%20for%20this%20but%20this%20morning%20a%20very%20interesting%20keynote%20took%20place.%20Representatives%20from%207%20large%20companies%20mentioned%20in%20the%20title%20gathered%20on%20stage%20and%20answered%20various%20questions%20by%20MySQL%27s%20Kaj%20Arno.%20These%20questions%20included%20things%20like%20%22how&#38;short_link=http://bit.ly/8XxJIk&#38;v=1&#38;apitype=1&#38;apikey=8afa39428933be41f8afdb8ea21a495c&#38;source=Shareaholic&#38;template=&#38;service=5&#38;tags=&#38;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+-+Sun+-+Flickr+-+Fotolog+-+Wikipedia+-+Facebook+-+YouTube+Comparison+-+MySQL+Conference+Day+2+Keynote&#38;link=http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/&#38;notes=Unfortunately%20I%20didn%27t%20find%20any%20available%20seats%20to%20take%20notes%20for%20this%20but%20this%20morning%20a%20very%20interesting%20keynote%20took%20place.%20Representatives%20from%207%20large%20companies%20mentioned%20in%20the%20title%20gathered%20on%20stage%20and%20answered%20various%20questions%20by%20MySQL%27s%20Kaj%20Arno.%20These%20questions%20included%20things%20like%20%22how&#38;short_link=http://bit.ly/8XxJIk&#38;v=1&#38;apitype=1&#38;apikey=8afa39428933be41f8afdb8ea21a495c&#38;source=Shareaholic&#38;template=&#38;service=257&#38;tags=&#38;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+-+Sun+-+Flickr+-+Fotolog+-+Wikipedia+-+Facebook+-+YouTube+Comparison+-+MySQL+Conference+Day+2+Keynote&#38;link=http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/&#38;notes=Unfortunately%20I%20didn%27t%20find%20any%20available%20seats%20to%20take%20notes%20for%20this%20but%20this%20morning%20a%20very%20interesting%20keynote%20took%20place.%20Representatives%20from%207%20large%20companies%20mentioned%20in%20the%20title%20gathered%20on%20stage%20and%20answered%20various%20questions%20by%20MySQL%27s%20Kaj%20Arno.%20These%20questions%20included%20things%20like%20%22how&#38;short_link=http://bit.ly/8XxJIk&#38;v=1&#38;apitype=1&#38;apikey=8afa39428933be41f8afdb8ea21a495c&#38;source=Shareaholic&#38;template=&#38;service=40&#38;tags=&#38;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+-+Sun+-+Flickr+-+Fotolog+-+Wikipedia+-+Facebook+-+YouTube+Comparison+-+MySQL+Conference+Day+2+Keynote&#38;link=http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/&#38;notes=Unfortunately%20I%20didn%27t%20find%20any%20available%20seats%20to%20take%20notes%20for%20this%20but%20this%20morning%20a%20very%20interesting%20keynote%20took%20place.%20Representatives%20from%207%20large%20companies%20mentioned%20in%20the%20title%20gathered%20on%20stage%20and%20answered%20various%20questions%20by%20MySQL%27s%20Kaj%20Arno.%20These%20questions%20included%20things%20like%20%22how&#38;short_link=http://bit.ly/8XxJIk&#38;v=1&#38;apitype=1&#38;apikey=8afa39428933be41f8afdb8ea21a495c&#38;source=Shareaholic&#38;template=&#38;service=202&#38;tags=&#38;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+-+Sun+-+Flickr+-+Fotolog+-+Wikipedia+-+Facebook+-+YouTube+Comparison+-+MySQL+Conference+Day+2+Keynote&#38;link=http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/&#38;notes=Unfortunately%20I%20didn%27t%20find%20any%20available%20seats%20to%20take%20notes%20for%20this%20but%20this%20morning%20a%20very%20interesting%20keynote%20took%20place.%20Representatives%20from%207%20large%20companies%20mentioned%20in%20the%20title%20gathered%20on%20stage%20and%20answered%20various%20questions%20by%20MySQL%27s%20Kaj%20Arno.%20These%20questions%20included%20things%20like%20%22how&#38;short_link=http://bit.ly/8XxJIk&#38;v=1&#38;apitype=1&#38;apikey=8afa39428933be41f8afdb8ea21a495c&#38;source=Shareaholic&#38;template=&#38;service=2&#38;tags=&#38;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li></ul>...<div
class=clear></div> <a
href="http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></div>]]></description> <content:encoded><![CDATA[<p>Unfortunately I didn&#039;t find any available seats to take notes for this but this morning a very interesting keynote took place. Representatives from 7 large companies mentioned in the title gathered on stage and answered various questions by MySQL&#039;s Kaj Arno.</p><p>These questions included things like &#034;how many MySQL servers do you have&#034;, &#034;how many DBAs&#034;, etc. It was a lot of fun, hopefully someone (Sheeri) will edit and post the video soon.</p><p>Keith has a nice summary of everything that went on together with the numbers <a
href="http://www.paragon-cs.com/wordpress/?p=144">here</a>.</p><p><strong>Update: </strong>Venu has even better notes <a
href="http://venublog.com/2008/04/16/notes-from-scaling-mysql-up-or-out/">here</a>.</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+-+Sun+-+Flickr+-+Fotolog+-+Wikipedia+-+Facebook+-+YouTube+Comparison+-+MySQL+Conference+Day+2+Keynote&amp;link=http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/&amp;notes=Unfortunately%20I%20didn%27t%20find%20any%20available%20seats%20to%20take%20notes%20for%20this%20but%20this%20morning%20a%20very%20interesting%20keynote%20took%20place.%20Representatives%20from%207%20large%20companies%20mentioned%20in%20the%20title%20gathered%20on%20stage%20and%20answered%20various%20questions%20by%20MySQL%27s%20Kaj%20Arno.%20These%20questions%20included%20things%20like%20%22how&amp;short_link=http://bit.ly/8XxJIk&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+-+Sun+-+Flickr+-+Fotolog+-+Wikipedia+-+Facebook+-+YouTube+Comparison+-+MySQL+Conference+Day+2+Keynote&amp;link=http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/&amp;notes=Unfortunately%20I%20didn%27t%20find%20any%20available%20seats%20to%20take%20notes%20for%20this%20but%20this%20morning%20a%20very%20interesting%20keynote%20took%20place.%20Representatives%20from%207%20large%20companies%20mentioned%20in%20the%20title%20gathered%20on%20stage%20and%20answered%20various%20questions%20by%20MySQL%27s%20Kaj%20Arno.%20These%20questions%20included%20things%20like%20%22how&amp;short_link=http://bit.ly/8XxJIk&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+-+Sun+-+Flickr+-+Fotolog+-+Wikipedia+-+Facebook+-+YouTube+Comparison+-+MySQL+Conference+Day+2+Keynote&amp;link=http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/&amp;notes=Unfortunately%20I%20didn%27t%20find%20any%20available%20seats%20to%20take%20notes%20for%20this%20but%20this%20morning%20a%20very%20interesting%20keynote%20took%20place.%20Representatives%20from%207%20large%20companies%20mentioned%20in%20the%20title%20gathered%20on%20stage%20and%20answered%20various%20questions%20by%20MySQL%27s%20Kaj%20Arno.%20These%20questions%20included%20things%20like%20%22how&amp;short_link=http://bit.ly/8XxJIk&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+-+Sun+-+Flickr+-+Fotolog+-+Wikipedia+-+Facebook+-+YouTube+Comparison+-+MySQL+Conference+Day+2+Keynote&amp;link=http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/&amp;notes=Unfortunately%20I%20didn%27t%20find%20any%20available%20seats%20to%20take%20notes%20for%20this%20but%20this%20morning%20a%20very%20interesting%20keynote%20took%20place.%20Representatives%20from%207%20large%20companies%20mentioned%20in%20the%20title%20gathered%20on%20stage%20and%20answered%20various%20questions%20by%20MySQL%27s%20Kaj%20Arno.%20These%20questions%20included%20things%20like%20%22how&amp;short_link=http://bit.ly/8XxJIk&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+-+Sun+-+Flickr+-+Fotolog+-+Wikipedia+-+Facebook+-+YouTube+Comparison+-+MySQL+Conference+Day+2+Keynote&amp;link=http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/&amp;notes=Unfortunately%20I%20didn%27t%20find%20any%20available%20seats%20to%20take%20notes%20for%20this%20but%20this%20morning%20a%20very%20interesting%20keynote%20took%20place.%20Representatives%20from%207%20large%20companies%20mentioned%20in%20the%20title%20gathered%20on%20stage%20and%20answered%20various%20questions%20by%20MySQL%27s%20Kaj%20Arno.%20These%20questions%20included%20things%20like%20%22how&amp;short_link=http://bit.ly/8XxJIk&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+-+Sun+-+Flickr+-+Fotolog+-+Wikipedia+-+Facebook+-+YouTube+Comparison+-+MySQL+Conference+Day+2+Keynote&amp;link=http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/&amp;notes=Unfortunately%20I%20didn%27t%20find%20any%20available%20seats%20to%20take%20notes%20for%20this%20but%20this%20morning%20a%20very%20interesting%20keynote%20took%20place.%20Representatives%20from%207%20large%20companies%20mentioned%20in%20the%20title%20gathered%20on%20stage%20and%20answered%20various%20questions%20by%20MySQL%27s%20Kaj%20Arno.%20These%20questions%20included%20things%20like%20%22how&amp;short_link=http://bit.ly/8XxJIk&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+-+Sun+-+Flickr+-+Fotolog+-+Wikipedia+-+Facebook+-+YouTube+Comparison+-+MySQL+Conference+Day+2+Keynote&amp;link=http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/&amp;notes=Unfortunately%20I%20didn%27t%20find%20any%20available%20seats%20to%20take%20notes%20for%20this%20but%20this%20morning%20a%20very%20interesting%20keynote%20took%20place.%20Representatives%20from%207%20large%20companies%20mentioned%20in%20the%20title%20gathered%20on%20stage%20and%20answered%20various%20questions%20by%20MySQL%27s%20Kaj%20Arno.%20These%20questions%20included%20things%20like%20%22how&amp;short_link=http://bit.ly/8XxJIk&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%20-%20Sun%20-%20Flickr%20-%20Fotolog%20-%20Wikipedia%20-%20Facebook%20-%20YouTube%20Comparison%20-%20MySQL%20Conference%20Day%202%20Keynote&amp;link=http://beerpla.net/2008/04/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/&amp;notes=Unfortunately%20I%20didn%27t%20find%20any%20available%20seats%20to%20take%20notes%20for%20this%20but%20this%20morning%20a%20very%20interesting%20keynote%20took%20place.%20Representatives%20from%207%20large%20companies%20mentioned%20in%20the%20title%20gathered%20on%20stage%20and%20answered%20various%20questions%20by%20MySQL%27s%20Kaj%20Arno.%20These%20questions%20included%20things%20like%20%22how&amp;short_link=http://bit.ly/8XxJIk&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/03/18/must-know-people-in-the-mysql-field/" rel="bookmark" title="March 18, 2008">Must-Know People In The MySQL Field</a></li><li><a
href="http://beerpla.net/2007/05/20/its-here-starcraft-2-is-announced-videos/" rel="bookmark" title="May 20, 2007">IT&#039;S HERE. STARCRAFT 2 IS ANNOUNCED (VIDEOS)!!!!!!!!!!!!!!!</a></li><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-presentation-at-the-kickfire-booth/" rel="bookmark" title="April 15, 2008">MySQL Conference: Presentation At The Kickfire Booth</a></li><li><a
href="http://beerpla.net/2008/08/14/how-to-find-out-the-number-of-videos-on-youtube/" rel="bookmark" title="August 14, 2008">How To Find Out The Number Of Videos On Youtube</a></li><li><a
href="http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/" rel="bookmark" title="February 17, 2009">Swapping Column Values in MySQL</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%2F16%2Fmysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote%2F&amp;title=MySQL%20%26%238211%3B%20Sun%20%26%238211%3B%20Flickr%20%26%238211%3B%20Fotolog%20%26%238211%3B%20Wikipedia%20%26%238211%3B%20Facebook%20%26%238211%3B%20YouTube%20Comparison%20%26%238211%3B%20MySQL%20Conference%20Day%202%20Keynote" id="wpa2a_34"><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/16/mysql-sun-flickr-fotolog-wikipedia-facebook-youtube-comparison-mysql-conference-day-2-keynote/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>MySQL Conference Liveblogging: Introduction To The BLOB Streaming Project (Wednesday 3:00PM)</title><link>http://beerpla.net/2008/04/16/mysql-conference-liveblogging-introduction-to-the-blob-streaming-project-wednesday-300pm/</link> <comments>http://beerpla.net/2008/04/16/mysql-conference-liveblogging-introduction-to-the-blob-streaming-project-wednesday-300pm/#comments</comments> <pubDate>Wed, 16 Apr 2008 22:05:06 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[blob]]></category> <category><![CDATA[conference]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[paul mccullagh]]></category> <category><![CDATA[pbxt]]></category> <category><![CDATA[primebase xt]]></category> <category><![CDATA[streaming]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/04/16/mysql-conference-liveblogging-introduction-to-the-blob-streaming-project-wednesday-300pm/</guid> <description><![CDATA[<ul><li>Paul McCullagh presents</li><li>BLOB</li></ul><ul><li>invented by Jim Starkey</li><li>Basic Large OBject</li><li>Binary Large OBject</li><li>photos, films, mp4 files, pdfs, etc</li></ul><li>how MySQL handles BLOBs</li><ul><li>mysql client send buffer -&#62; receive buffer on the server (max_allowed_packet)</li><li>streaming a BLOB</li></ul><ul><li>continuous data stream</li><li>stream BLOB data directly in and out of the database</li><li>store BLOBs of any size (&#62;4GB) in the database</li><li>create a scalable back-end that can handle any throughput and storage requirements. Wouldn&#039;t need to know in advance how big the database will get</li><li>provide an open system that can be used by all engines</li><li>provide extensions for BLOB streaming to existing MySQL clients</li></ul><li><strong>why put BLOBs in the database?</strong></li><ul><li><strong>referential integrity</strong> (no invalid references), can take a lot of</li>...<div
class=clear></div> <a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-introduction-to-the-blob-streaming-project-wednesday-300pm/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ul>]]></description> <content:encoded><![CDATA[<ul><li>Paul McCullagh presents</li><li>BLOB</li><ul><li>invented by Jim Starkey</li><li>Basic Large OBject</li><li>Binary Large OBject</li><li>photos, films, mp4 files, pdfs, etc</li></ul><li>how MySQL handles BLOBs</li><ul><li>mysql client send buffer -&gt; receive buffer on the server (max_allowed_packet)</li><li>streaming a BLOB</li><ul><li>continuous data stream</li><li>stream BLOB data directly in and out of the database</li><li>store BLOBs of any size (&gt;4GB) in the database</li><li>create a scalable back-end that can handle any throughput and storage requirements. Wouldn&#039;t need to know in advance how big the database will get</li><li>provide an open system that can be used by all engines</li><li>provide extensions for BLOB streaming to existing MySQL clients</li></ul></ul><li><strong>why put BLOBs in the database?</strong></li><ul><li><strong>referential integrity</strong> (no invalid references), can take a lot of time to sort out missing data</li><li><strong>all data in one place</strong> &#8211; structured and unstructured. Good for testing</li><li><strong>small BLOBs</strong> are handled better by databases</li><li><strong>backups</strong> are consistent</li><li>BLOBs can be <strong>replicated</strong></li></ul><li>why &#034;not to BLOB&#034; (currently)?</li><ul><li>a BLOB column makes a table slow</li><ul><li>big rows in memory</li><li>sequential scans are not possible</li></ul><li>database becomes too big</li><ul><li>cannot be copied easily</li><li>backups become slow</li><li>space not freed on delete</li><li>database doesn&#039;t scale well</li></ul></ul><li>solution to these problems</li><ul><li>a separate BLOB repository, outside of database rows</li><li>references are stored in the table</li><li>allows for incremental backups</li><li>automatic defrag and compaction</li><li>BLOBs not written to binlogs</li><li>repository can be scaled-out</li></ul><li>Paul shows BLOB streaming architecture</li><ul><li>BLOB storage engine (MyBS, heh heh, Baron especially likes this acronym)</li><li>PBXT &#8211; streaming enabled engine or other storage engines</li><li>HTTP-based API extension</li></ul><li>BLOB streaming engine</li><ul><li>does not provide conventional table storage (CREATE TABLE syntax only for system tables)</li><li><strong>built-in HTTP server (port 8080 by default)</strong></li><li>BLOB repository</li><li>provides a server-side API</li></ul><li>Temp BLOB timeout</li><ul><li>BLOBs that are not referenced are deleted from the repository</li><li>initially all BLOBs don&#039;t have references to them yet</li><li>timeout is used (mysql_temp_blob_timeout)</li></ul><li><strong>Paul shows a very interesting demo</strong></li><ul><li><strong>creates a table of type PBXT</strong></li><li><strong>uploads an image into the BLOB engine directly (using curl)</strong></li><li><strong>gets back a reference id for the newly inserted BLOB</strong></li><li><strong>accesses the image right in the browser using a GET request with the reference id from above</strong></li><li><strong>Paul does a SELECT on the BLOB engine and gets back the earlier inserted BLOB with such things as BLOB size, content type (MIME), and EXIF data</strong></li><li><strong>now Paul shows what happens if you insert a BLOB and don&#039;t access it. It then gets automatically purged from the BLOB engine after the BLOB timeout (mentioned above)</strong></li><li>I like what I&#039;m seeing so far. Very interesting work, Paul. Definitely worth checking out the actual slides</li></ul><li>client-side extensions</li><ul><li>JDBC already works get/setBinaryStream(), get/setBlob()</li><li>Google Summer of Code 2008 to add connector to PHP</li><li>still to be done</li><ul><li>mysqlclient library &#8211; simple extension to do HTTP GET and PUT</li><li>other languages (Perl, Ruby, etc)</li></ul></ul><li>backup</li><ul><li>mysqldump will dump repository names and references</li></ul><li>future plans</li><ul><li>distributed repository</li></ul><li><strong>someone asks a question about BLOB repository&#039;s performance and benchmarks</strong></li><ul><li>Paul has a convenient benchmark of a BLOB engine compared to xfs</li><li>on the chart, creating and reading BLOBs stays practically the same no matter how many objects are present (in the engine or on the file system), while the file system starts high but quickly degrades almost to 0</li><li>Why does the file system degrade to 0? Did you put all the files in the same directory? This looks very odd</li><li>the next slide shows that when adding threads, the BLOB engine yet again performs the same and scales well while the file system starts degrading after 4-8 threads</li><li>why is the performance better than, let&#039;s say, lighttpd pulling from a file system?</li></ul><li><a
href="http://www.blobstreaming.org">http://www.blobstreaming.org</a></li><li><a
href="http://sourceforge.net/projects/mybs">http://sourceforge.net/projects/mybs</a></li><li><a
href="http://pbxt.blogspot.com">http://pbxt.blogspot.com</a></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+Introduction+To+The+BLOB+Streaming+Project+%28Wednesday+3%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-introduction-to-the-blob-streaming-project-wednesday-300pm/&amp;notes=%20Paul%20McCullagh%20presents%20BLOB%20%20invented%20by%20Jim%20Starkey%20Basic%20Large%20OBject%20Binary%20Large%20OBject%20photos%2C%20films%2C%20mp4%20files%2C%20pdfs%2C%20etc%20how%20MySQL%20handles%20BLOBs%20%20mysql%20client%20send%20buffer%20-%26gt%3B%20receive%20buffer%20on%20the%20server%20%28max_allowed_packet%29%20streaming%20a%20BLOB%20%20continuous%20data%20stream%20stream%20BLOB%20data%20direct&amp;short_link=http://bit.ly/cAOqge&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+Introduction+To+The+BLOB+Streaming+Project+%28Wednesday+3%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-introduction-to-the-blob-streaming-project-wednesday-300pm/&amp;notes=%20Paul%20McCullagh%20presents%20BLOB%20%20invented%20by%20Jim%20Starkey%20Basic%20Large%20OBject%20Binary%20Large%20OBject%20photos%2C%20films%2C%20mp4%20files%2C%20pdfs%2C%20etc%20how%20MySQL%20handles%20BLOBs%20%20mysql%20client%20send%20buffer%20-%26gt%3B%20receive%20buffer%20on%20the%20server%20%28max_allowed_packet%29%20streaming%20a%20BLOB%20%20continuous%20data%20stream%20stream%20BLOB%20data%20direct&amp;short_link=http://bit.ly/cAOqge&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+Introduction+To+The+BLOB+Streaming+Project+%28Wednesday+3%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-introduction-to-the-blob-streaming-project-wednesday-300pm/&amp;notes=%20Paul%20McCullagh%20presents%20BLOB%20%20invented%20by%20Jim%20Starkey%20Basic%20Large%20OBject%20Binary%20Large%20OBject%20photos%2C%20films%2C%20mp4%20files%2C%20pdfs%2C%20etc%20how%20MySQL%20handles%20BLOBs%20%20mysql%20client%20send%20buffer%20-%26gt%3B%20receive%20buffer%20on%20the%20server%20%28max_allowed_packet%29%20streaming%20a%20BLOB%20%20continuous%20data%20stream%20stream%20BLOB%20data%20direct&amp;short_link=http://bit.ly/cAOqge&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+Introduction+To+The+BLOB+Streaming+Project+%28Wednesday+3%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-introduction-to-the-blob-streaming-project-wednesday-300pm/&amp;notes=%20Paul%20McCullagh%20presents%20BLOB%20%20invented%20by%20Jim%20Starkey%20Basic%20Large%20OBject%20Binary%20Large%20OBject%20photos%2C%20films%2C%20mp4%20files%2C%20pdfs%2C%20etc%20how%20MySQL%20handles%20BLOBs%20%20mysql%20client%20send%20buffer%20-%26gt%3B%20receive%20buffer%20on%20the%20server%20%28max_allowed_packet%29%20streaming%20a%20BLOB%20%20continuous%20data%20stream%20stream%20BLOB%20data%20direct&amp;short_link=http://bit.ly/cAOqge&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+Introduction+To+The+BLOB+Streaming+Project+%28Wednesday+3%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-introduction-to-the-blob-streaming-project-wednesday-300pm/&amp;notes=%20Paul%20McCullagh%20presents%20BLOB%20%20invented%20by%20Jim%20Starkey%20Basic%20Large%20OBject%20Binary%20Large%20OBject%20photos%2C%20films%2C%20mp4%20files%2C%20pdfs%2C%20etc%20how%20MySQL%20handles%20BLOBs%20%20mysql%20client%20send%20buffer%20-%26gt%3B%20receive%20buffer%20on%20the%20server%20%28max_allowed_packet%29%20streaming%20a%20BLOB%20%20continuous%20data%20stream%20stream%20BLOB%20data%20direct&amp;short_link=http://bit.ly/cAOqge&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+Introduction+To+The+BLOB+Streaming+Project+%28Wednesday+3%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-introduction-to-the-blob-streaming-project-wednesday-300pm/&amp;notes=%20Paul%20McCullagh%20presents%20BLOB%20%20invented%20by%20Jim%20Starkey%20Basic%20Large%20OBject%20Binary%20Large%20OBject%20photos%2C%20films%2C%20mp4%20files%2C%20pdfs%2C%20etc%20how%20MySQL%20handles%20BLOBs%20%20mysql%20client%20send%20buffer%20-%26gt%3B%20receive%20buffer%20on%20the%20server%20%28max_allowed_packet%29%20streaming%20a%20BLOB%20%20continuous%20data%20stream%20stream%20BLOB%20data%20direct&amp;short_link=http://bit.ly/cAOqge&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+Introduction+To+The+BLOB+Streaming+Project+%28Wednesday+3%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-introduction-to-the-blob-streaming-project-wednesday-300pm/&amp;notes=%20Paul%20McCullagh%20presents%20BLOB%20%20invented%20by%20Jim%20Starkey%20Basic%20Large%20OBject%20Binary%20Large%20OBject%20photos%2C%20films%2C%20mp4%20files%2C%20pdfs%2C%20etc%20how%20MySQL%20handles%20BLOBs%20%20mysql%20client%20send%20buffer%20-%26gt%3B%20receive%20buffer%20on%20the%20server%20%28max_allowed_packet%29%20streaming%20a%20BLOB%20%20continuous%20data%20stream%20stream%20BLOB%20data%20direct&amp;short_link=http://bit.ly/cAOqge&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%20Introduction%20To%20The%20BLOB%20Streaming%20Project%20%28Wednesday%203%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-introduction-to-the-blob-streaming-project-wednesday-300pm/&amp;notes=%20Paul%20McCullagh%20presents%20BLOB%20%20invented%20by%20Jim%20Starkey%20Basic%20Large%20OBject%20Binary%20Large%20OBject%20photos%2C%20films%2C%20mp4%20files%2C%20pdfs%2C%20etc%20how%20MySQL%20handles%20BLOBs%20%20mysql%20client%20send%20buffer%20-%26gt%3B%20receive%20buffer%20on%20the%20server%20%28max_allowed_packet%29%20streaming%20a%20BLOB%20%20continuous%20data%20stream%20stream%20BLOB%20data%20direct&amp;short_link=http://bit.ly/cAOqge&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/15/mysql-conference-liveblogging-the-future-of-mysql-tuesday-1155am-2/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: The Future Of MySQL (Tuesday 11:55AM)</a></li><li><a
href="http://beerpla.net/2008/03/11/mysql-falcon-storage-engine-enters-beta-stage/" rel="bookmark" title="March 11, 2008">MySQL Falcon Storage Engine Enters Beta Stage.</a></li><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: EXPLAIN Demystified (Tuesday 2:00PM)</a></li><li><a
href="http://beerpla.net/2008/03/26/setting-up-a-mysql-cluster/" rel="bookmark" title="March 26, 2008">Setting Up A MySQL Cluster</a></li><li><a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-monitoring-tools-wednesday-515pm/" rel="bookmark" title="April 16, 2008">MySQL Conference Liveblogging: Monitoring Tools (Wednesday 5:15PM)</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%2F16%2Fmysql-conference-liveblogging-introduction-to-the-blob-streaming-project-wednesday-300pm%2F&amp;title=MySQL%20Conference%20Liveblogging%3A%20Introduction%20To%20The%20BLOB%20Streaming%20Project%20%28Wednesday%203%3A00PM%29" id="wpa2a_36"><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/16/mysql-conference-liveblogging-introduction-to-the-blob-streaming-project-wednesday-300pm/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>MySQL Conference Liveblogging: MySQL Performance Under A Microscope: The Tobias And Jay Show (Wednesday 2:00PM)</title><link>http://beerpla.net/2008/04/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/</link> <comments>http://beerpla.net/2008/04/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/#comments</comments> <pubDate>Wed, 16 Apr 2008 21:18:17 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[conference]]></category> <category><![CDATA[jay]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Performance]]></category> <category><![CDATA[tobias]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/04/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/</guid> <description><![CDATA[<ul><li>Jay Pipes, Tobias Asplund</li><li>Finding out the number of rows that would have been returned (MyISAM and InnoDB)</li></ul><ul><li>SQL_CALC_FOUND_ROWS and FOUND_ROWS()</li><li>COUNT(*)</li><li>MEMORY table</li><li>if query cache is on, then it makes no difference</li><li>if it&#039;s off</li></ul><ul><li>Memory MyISAM is fastest</li><li>FOUND_ROWS() is slightly slower than count(*)</li></ul><li>more in the slides that I&#039;ll add later</li><li>quite a lot of humor, these guys are fun</li><li><strong>query union vs index_merge union</strong></li><ul><li>SELECT &#8230; WHERE a UNION SELECT &#8230; WHERE b<br
/>vs<br
/>SELECT &#8230; WHERE a AND b</li><li>index_merge wins</li></ul><li><strong>composite index vs index merge</strong></li><ul><li>composite index is faster</li><li>of course, multiple indexes are more flexible than composite index</li></ul><li><strong>sort union vs composite index</strong></li><ul><li>&#8230;</li></ul><li>unix time (int unsigned) vs datetime</li><ul><li>query cache</li>...<div
class=clear></div> <a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></ul>]]></description> <content:encoded><![CDATA[<ul><li>Jay Pipes, Tobias Asplund</li><li>Finding out the number of rows that would have been returned (MyISAM and InnoDB)</li><ul><li>SQL_CALC_FOUND_ROWS and FOUND_ROWS()</li><li>COUNT(*)</li><li>MEMORY table</li><li>if query cache is on, then it makes no difference</li><li>if it&#039;s off</li><ul><li>Memory MyISAM is fastest</li><li>FOUND_ROWS() is slightly slower than count(*)</li></ul><li>more in the slides that I&#039;ll add later</li></ul><li>quite a lot of humor, these guys are fun</li><li><strong>query union vs index_merge union</strong></li><ul><li>SELECT &#8230; WHERE a UNION SELECT &#8230; WHERE b<br
/>vs<br
/>SELECT &#8230; WHERE a AND b</li><li>index_merge wins</li></ul><li><strong>composite index vs index merge</strong></li><ul><li>composite index is faster</li><li>of course, multiple indexes are more flexible than composite index</li></ul><li><strong>sort union vs composite index</strong></li><ul><li>&#8230;</li></ul><li>unix time (int unsigned) vs datetime</li><ul><li>query cache disabled</li><li>100k rows</li><li>now and 20 years back</li><li>retrieval range between 50 and 365 days</li><li>all data fits into memory</li><li>UNIX_TIMESTAMP is worst</li><li>DATETIME in the middle</li><li>strtotime() fastest</li></ul><li>is BENCHMARK() a good simulation test?</li><ul><li>NOW()</li><li>MONTH(NOW())</li><li>MONTH(&#039;YYYY-MM-DD&#039;)</li><li>DATE_FORMAT()</li><li>SUBSTRING()</li><li>all about the same if php benchmark script is used</li><li>BENCHMARK() is very unreliable, the results vary a lot</li></ul><li>X in Y how many times?</li><ul><li>3 different methods on mysql forge</li><li>2 UDFs and 1 using native functions</li><li>query cache off</li><li>1K rows</li><li>all rows have &#034;/&#034;</li><li>count the number of &#034;/&#034;</li><li>Marcelo&#039;s solution &#034;COUNT_CHAR_OCCURRENCE&#034;: 4th place</li><li>Garrett Hill&#039;s solution &#034;countstring&#034; (it&#039;s technically slightly wrong, because it doesn&#039;t account for multibyte characters): 2nd place</li><li>Roland Bouman&#039;s solution using mysql functions: 1st place</li><li>Jay&#039;s way: function in php: 3rd place</li></ul><li>MEMORY engine HASH index vs BTREE index</li><ul><li>BTREE is faster</li><li>HASH uses less memory</li></ul></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+MySQL+Performance+Under+A+Microscope%3A+The+Tobias+And+Jay+Show+%28Wednesday+2%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/&amp;notes=%20Jay%20Pipes%2C%20Tobias%20Asplund%20Finding%20out%20the%20number%20of%20rows%20that%20would%20have%20been%20returned%20%28MyISAM%20and%20InnoDB%29%20%20SQL_CALC_FOUND_ROWS%20and%20FOUND_ROWS%28%29%20COUNT%28%2A%29%20MEMORY%20table%20if%20query%20cache%20is%20on%2C%20then%20it%20makes%20no%20difference%20if%20it%27s%20off%20%20Memory%20MyISAM%20is%20fastest%20FOUND_ROWS%28%29%20is%20slightly%20slower%20than%20count%28%2A&amp;short_link=http://bit.ly/9pz9Dd&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+MySQL+Performance+Under+A+Microscope%3A+The+Tobias+And+Jay+Show+%28Wednesday+2%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/&amp;notes=%20Jay%20Pipes%2C%20Tobias%20Asplund%20Finding%20out%20the%20number%20of%20rows%20that%20would%20have%20been%20returned%20%28MyISAM%20and%20InnoDB%29%20%20SQL_CALC_FOUND_ROWS%20and%20FOUND_ROWS%28%29%20COUNT%28%2A%29%20MEMORY%20table%20if%20query%20cache%20is%20on%2C%20then%20it%20makes%20no%20difference%20if%20it%27s%20off%20%20Memory%20MyISAM%20is%20fastest%20FOUND_ROWS%28%29%20is%20slightly%20slower%20than%20count%28%2A&amp;short_link=http://bit.ly/9pz9Dd&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+MySQL+Performance+Under+A+Microscope%3A+The+Tobias+And+Jay+Show+%28Wednesday+2%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/&amp;notes=%20Jay%20Pipes%2C%20Tobias%20Asplund%20Finding%20out%20the%20number%20of%20rows%20that%20would%20have%20been%20returned%20%28MyISAM%20and%20InnoDB%29%20%20SQL_CALC_FOUND_ROWS%20and%20FOUND_ROWS%28%29%20COUNT%28%2A%29%20MEMORY%20table%20if%20query%20cache%20is%20on%2C%20then%20it%20makes%20no%20difference%20if%20it%27s%20off%20%20Memory%20MyISAM%20is%20fastest%20FOUND_ROWS%28%29%20is%20slightly%20slower%20than%20count%28%2A&amp;short_link=http://bit.ly/9pz9Dd&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+MySQL+Performance+Under+A+Microscope%3A+The+Tobias+And+Jay+Show+%28Wednesday+2%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/&amp;notes=%20Jay%20Pipes%2C%20Tobias%20Asplund%20Finding%20out%20the%20number%20of%20rows%20that%20would%20have%20been%20returned%20%28MyISAM%20and%20InnoDB%29%20%20SQL_CALC_FOUND_ROWS%20and%20FOUND_ROWS%28%29%20COUNT%28%2A%29%20MEMORY%20table%20if%20query%20cache%20is%20on%2C%20then%20it%20makes%20no%20difference%20if%20it%27s%20off%20%20Memory%20MyISAM%20is%20fastest%20FOUND_ROWS%28%29%20is%20slightly%20slower%20than%20count%28%2A&amp;short_link=http://bit.ly/9pz9Dd&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+MySQL+Performance+Under+A+Microscope%3A+The+Tobias+And+Jay+Show+%28Wednesday+2%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/&amp;notes=%20Jay%20Pipes%2C%20Tobias%20Asplund%20Finding%20out%20the%20number%20of%20rows%20that%20would%20have%20been%20returned%20%28MyISAM%20and%20InnoDB%29%20%20SQL_CALC_FOUND_ROWS%20and%20FOUND_ROWS%28%29%20COUNT%28%2A%29%20MEMORY%20table%20if%20query%20cache%20is%20on%2C%20then%20it%20makes%20no%20difference%20if%20it%27s%20off%20%20Memory%20MyISAM%20is%20fastest%20FOUND_ROWS%28%29%20is%20slightly%20slower%20than%20count%28%2A&amp;short_link=http://bit.ly/9pz9Dd&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+MySQL+Performance+Under+A+Microscope%3A+The+Tobias+And+Jay+Show+%28Wednesday+2%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/&amp;notes=%20Jay%20Pipes%2C%20Tobias%20Asplund%20Finding%20out%20the%20number%20of%20rows%20that%20would%20have%20been%20returned%20%28MyISAM%20and%20InnoDB%29%20%20SQL_CALC_FOUND_ROWS%20and%20FOUND_ROWS%28%29%20COUNT%28%2A%29%20MEMORY%20table%20if%20query%20cache%20is%20on%2C%20then%20it%20makes%20no%20difference%20if%20it%27s%20off%20%20Memory%20MyISAM%20is%20fastest%20FOUND_ROWS%28%29%20is%20slightly%20slower%20than%20count%28%2A&amp;short_link=http://bit.ly/9pz9Dd&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+MySQL+Performance+Under+A+Microscope%3A+The+Tobias+And+Jay+Show+%28Wednesday+2%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/&amp;notes=%20Jay%20Pipes%2C%20Tobias%20Asplund%20Finding%20out%20the%20number%20of%20rows%20that%20would%20have%20been%20returned%20%28MyISAM%20and%20InnoDB%29%20%20SQL_CALC_FOUND_ROWS%20and%20FOUND_ROWS%28%29%20COUNT%28%2A%29%20MEMORY%20table%20if%20query%20cache%20is%20on%2C%20then%20it%20makes%20no%20difference%20if%20it%27s%20off%20%20Memory%20MyISAM%20is%20fastest%20FOUND_ROWS%28%29%20is%20slightly%20slower%20than%20count%28%2A&amp;short_link=http://bit.ly/9pz9Dd&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%20MySQL%20Performance%20Under%20A%20Microscope%3A%20The%20Tobias%20And%20Jay%20Show%20%28Wednesday%202%3A00PM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/&amp;notes=%20Jay%20Pipes%2C%20Tobias%20Asplund%20Finding%20out%20the%20number%20of%20rows%20that%20would%20have%20been%20returned%20%28MyISAM%20and%20InnoDB%29%20%20SQL_CALC_FOUND_ROWS%20and%20FOUND_ROWS%28%29%20COUNT%28%2A%29%20MEMORY%20table%20if%20query%20cache%20is%20on%2C%20then%20it%20makes%20no%20difference%20if%20it%27s%20off%20%20Memory%20MyISAM%20is%20fastest%20FOUND_ROWS%28%29%20is%20slightly%20slower%20than%20count%28%2A&amp;short_link=http://bit.ly/9pz9Dd&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/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: EXPLAIN Demystified (Tuesday 2:00PM)</a></li><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-the-future-of-mysql-tuesday-1155am-2/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: The Future Of MySQL (Tuesday 11:55AM)</a></li><li><a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-benchmarking-tools-wednesday-425pm/" rel="bookmark" title="April 16, 2008">MySQL Conference Liveblogging: Benchmarking Tools (Wednesday 4:25PM)</a></li><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-performance-guide-for-mysql-cluster-tuesday-1050am/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: Performance Guide For MySQL Cluster (Tuesday 10:50AM)</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></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%2F16%2Fmysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm%2F&amp;title=MySQL%20Conference%20Liveblogging%3A%20MySQL%20Performance%20Under%20A%20Microscope%3A%20The%20Tobias%20And%20Jay%20Show%20%28Wednesday%202%3A00PM%29" id="wpa2a_38"><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/16/mysql-conference-liveblogging-mysql-performance-under-a-microscope-the-tobias-and-jay-show-wednesday-200pm/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>MySQL Conference Liveblogging: Applied Partitioning And Scaling your (OLTP) Database System (Wednesday 11:55AM)</title><link>http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/</link> <comments>http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/#comments</comments> <pubDate>Wed, 16 Apr 2008 19:05:42 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[applied]]></category> <category><![CDATA[conference]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[oltp]]></category> <category><![CDATA[partitioning]]></category> <category><![CDATA[scaling]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/</guid> <description><![CDATA[<ul><li>Phil Hilderbrand of <a
href="http://www.theplatform.com/">thePlatform for Media, Inc</a> presents</li><li>classic partitioning</li></ul><ul><li>old school &#8211; union in the archive tables</li><li>auto partitioning and partition pruning</li><li>great for data warehousing</li><li>query performance improved</li><li>maintenance is clearly improved</li></ul><li>design issues in applying partitioning to OLTP (On-Line Transaction Processing)</li><ul><li>often id driven access vs date driven access</li><li>1 big clients could be 80% of the whole database, so there&#039;s a difficulty selecting partitioning schemes</li></ul><li><strong><a
href="http://dev.mysql.com/doc/refman/5.1/en/partitioning.html">partitioning is only supported starting from MySQL 5.1</a></strong></li><li>understanding the benefits</li><ul><li>reducing seek and scan set sizes</li><li>improving inserts/updates durations</li><li>making maintenance easier</li></ul><li>shows an EXPLAIN output for SELECTS on non-partitioned and partitioned tables. The results are significantly better for partitions</li><li>OPTIMIZE TABLE on an unpartitioned table takes 1.14s</li><li>ALTER TABLE ...<div
class=clear></div> <a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></li>]]></description> <content:encoded><![CDATA[<ul><li>Phil Hilderbrand of <a
href="http://www.theplatform.com/">thePlatform for Media, Inc</a> presents</li><li>classic partitioning</li><ul><li>old school &#8211; union in the archive tables</li><li>auto partitioning and partition pruning</li><li>great for data warehousing</li><li>query performance improved</li><li>maintenance is clearly improved</li></ul><li>design issues in applying partitioning to OLTP (On-Line Transaction Processing)</li><ul><li>often id driven access vs date driven access</li><li>1 big clients could be 80% of the whole database, so there&#039;s a difficulty selecting partitioning schemes</li></ul><li><strong><a
href="http://dev.mysql.com/doc/refman/5.1/en/partitioning.html">partitioning is only supported starting from MySQL 5.1</a></strong></li><li>understanding the benefits</li><ul><li>reducing seek and scan set sizes</li><li>improving inserts/updates durations</li><li>making maintenance easier</li></ul><li>shows an EXPLAIN output for SELECTS on non-partitioned and partitioned tables. The results are significantly better for partitions</li><li>OPTIMIZE TABLE on an unpartitioned table takes 1.14s</li><li>ALTER TABLE REBUILD PARTITION p1; on a partitioned table takes 0.03s</li><li>ALTER TABLE REBUILD PARTITION p1, p2, p3, p4, &#8230;, p10; takes 0.27s</li><li>design consideration</li><ul><li>table sizes and predicted growth patterns &#8211; partition big tables and also partition in advance, if you predict quick growth</li><li>access patterns &#8211; select what you want to partition by in a smart way, date, id, etc</li><li>keys and indexes &#8211; <a
href="http://dev.mysql.com/doc/refman/5.1/en/partitioning-limitations.html">there are a few restrictions</a>, foreign keys are currently not supported</li><li>availability requirements</li><li>manageability considerations &#8211; choosing to partition by hash if there is a TON of data</li><li>reuse / scope considerations &#8211; think ahead, think of the usage</li></ul><li>partitioning methods</li><ul><li><strong>range partitioning</strong></li><ul><li><strong>data usually accessed by date</strong></li><li>limited number of primary partitions needed</li><li>ordered intelligent keys</li><li>support sub partitions</li></ul><li><strong>list partitioning</strong></li><ul><li><strong>grouping data in partitions out of order (1,5,7 in partition x)</strong></li><li>limited number of primary partitions needed</li><li>intelligent keys</li><li>supports sub partitions</li></ul><li><strong>hash partitioning</strong></li><ul><li><strong>low maintenance</strong></li><li>works with limited or large number of partitions</li><li>non-intelligent keys (can work in some cases with intelligent keys)</li></ul><li><strong>key partitioning</strong></li><ul><li><strong>non-integer based partitioned keys (MySQL converts to int for you)</strong></li><li>low maintenance</li></ul></ul><li>hash partitioning example</li><ul><li>hash(mod%num_partitions)</li><li>in this example, Phil has stores, employees, and inventory. He decided to partition by store.</li><li><a
href="http://dev.mysql.com/doc/refman/5.1/en/partitioning-management-hash-key.html">http://dev.mysql.com/doc/refman/5.1/en/partitioning-management-hash-key.html</a></li><li>50 stores</li><ul><li>ALTER TABLE my_store PARTITION BY HASH(id) PARTITIONS 50;</li><li>ALTER TABLE my_employee PARTITION BY HASH(store_id) PARTITIONS 50;</li><li>ALTER TABLE my_inventory PARTITION BY HASH(store_id) PARTITIONS 50;</li></ul><li>ALTER obviously takes a long time and blocks (grr)</li><li><strong>adding partitions</strong></li><ul><li>ALTER TABLE my_store ADD PARTITION PARTITIONS 2;</li><li>ALTER TABLE my_employee ADD PARTITION PARTITIONS 2;</li><li>ALTER TABLE my_inventory ADD PARTITION PARTITIONS 2;</li></ul><li>ALTER takes some time again, though less (how come if the partitions are empty?)</li><li><strong>SELECT table_name, partition_name, table_rows FROM information_schema.partitions &#8230; shows info on partitions</strong></li><li><strong>remove 4 partitions</strong></li><ul><li>ALTER TABLE my_store COALESCE PARTITION 4;</li><li>ALTER TABLE my_employee COALESCE PARTITION 4;</li><li>ALTER TABLE my_inventory COALESCE PARTITION 4;</li></ul></ul></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+Applied+Partitioning+And+Scaling+your+%28OLTP%29+Database+System+%28Wednesday+11%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&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+Applied+Partitioning+And+Scaling+your+%28OLTP%29+Database+System+%28Wednesday+11%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&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+Applied+Partitioning+And+Scaling+your+%28OLTP%29+Database+System+%28Wednesday+11%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&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+Applied+Partitioning+And+Scaling+your+%28OLTP%29+Database+System+%28Wednesday+11%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&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+Applied+Partitioning+And+Scaling+your+%28OLTP%29+Database+System+%28Wednesday+11%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&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+Applied+Partitioning+And+Scaling+your+%28OLTP%29+Database+System+%28Wednesday+11%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&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+Applied+Partitioning+And+Scaling+your+%28OLTP%29+Database+System+%28Wednesday+11%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&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%20Applied%20Partitioning%20And%20Scaling%20your%20%28OLTP%29%20Database%20System%20%28Wednesday%2011%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&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/15/mysql-conference-liveblogging-performance-guide-for-mysql-cluster-tuesday-1050am/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: Performance Guide For MySQL Cluster (Tuesday 10:50AM)</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/15/mysql-conference-liveblogging-the-future-of-mysql-tuesday-1155am-2/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: The Future Of MySQL (Tuesday 11:55AM)</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/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: EXPLAIN Demystified (Tuesday 2:00PM)</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%2F16%2Fmysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am%2F&amp;title=MySQL%20Conference%20Liveblogging%3A%20Applied%20Partitioning%20And%20Scaling%20your%20%28OLTP%29%20Database%20System%20%28Wednesday%2011%3A55AM%29" id="wpa2a_40"><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/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
