<?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"
	>

<channel>
	<title>MySQL Performance Blog</title>
	<atom:link href="http://www.mysqlperformanceblog.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com</link>
	<description>Everything about MySQL Performance</description>
	<pubDate>Fri, 03 Jul 2009 02:02:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Onsite and Remote - getting best of both worlds</title>
		<link>http://www.mysqlperformanceblog.com/2009/07/02/onsite-and-remote-getting-best-of-both-worlds/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/07/02/onsite-and-remote-getting-best-of-both-worlds/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 02:01:20 +0000</pubDate>
		<dc:creator>peter</dc:creator>
		
		<category><![CDATA[percona]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=712</guid>
		<description><![CDATA[At Percona we provide services both Onsite - visiting the customers and Remote - logging in to their systems or communicating via email,phone,instant messaging.  
We believe both approaches have their benefits and drawbacks and mixing them right way allows you to get your problems solved most efficient way.
Onsite  visits are great as they [...]]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://www.percona.com">Percona</a> we provide services both Onsite - visiting the customers and Remote - logging in to their systems or communicating via email,phone,instant messaging.  </p>
<p>We believe both approaches have their benefits and drawbacks and mixing them right way allows you to get your problems solved most efficient way.</p>
<p><strong>Onsite</strong>  visits are great as they allow consultant to meet your team in person and great for relationship building.  It is great for architecture design and review as you can sit down with the team and use drawing board. It also often allows the best focus both for consultant and for participating team - when consulting visit is arranged it is usually the top priority for some of the staff members which provide consultant with information and assistance he might need.  </p>
<p>Onsite visits also often allow to get prompt attention from other team - looking for network engineer to understand network topology or for someone from marketing to get the growth plans - they typically can be brought in for question. </p>
<p>I believe Onsite visits also offer unmatched training experience for the team - one of the team members can work side by side with consultants observing what he does and asking the question about the progress.  </p>
<p>The Single Day visits are often extremely valuable as a kick off to do application redesign, for performance review or for starting long term Remote DBA or support relationships.  They can be done with little planning as basically for any system there is enough work to spend efficiently understanding the system and working on the pressing problems customer may have.    Such visits are often result in a lot of &#8220;homework&#8221; as application changes or implementing changes on production which when can benefit from remote followups to validate changes and provide further advice. </p>
<p>Multi day onsite visits require a bit more planning to be efficient.   Many times in my career I would come to the customer for a week only to find I have created the implementation plan within 1-2 days and it will take a while to implement it and pass it through development and testing stages.    Before long onsite visit it is very good to have a call with consultant to understand what exactly needs to be done, how much time and what resources it requires.  </p>
<p>Projects which can be efficient as multi day visits are whenever implementation is required (coding unlike giving advice takes a lot of time) - migration projects, any forms of scripting,  implementation (writing queries), hands on setting up MySQL, Replication, Monitoring,  High Availability with MMM or DRBD are good examples.   </p>
<p>Another good example of efficient Multi-Day visit is when there are multiple groups or multiple applications using MySQL - in such case each of the problem areas/groups can gets its own day or few hours which keeps consultant busy.</p>
<p>To make a Multi-Day visit efficient it is important to plan on what will be done - what people will consultant need to work with and which problems do they have.   Providing proper access and having staging/test systems available are also often required.   </p>
<p><strong>Remote </strong>  work has a benefit of consultant being available in the short time intervals and being able to multi task.  </p>
<p>Working with the customer there are two types of &#8220;waits&#8221; which are often encountered. First - waiting on the customer. It could be fixing access problems, completing application changes, QA,  scheduling downtime to implement changes and millions of other things.      Second - waiting on database (or other) operations to complete - backup, restore,  ALTER TABLE, load testing -  all of these things take time and make consultant to wait for them.   </p>
<p>In case you&#8217;re working remotely consultant typically has other tasks to do while such long processes are  running.  If you&#8217;re spending time onsite you may have other tasks or you may not while if you&#8217;re working remotely there are always things to do.</p>
<p>Another benefit of remote work - it truly allows to engage the team.  If you have consultant onsite getting another one with some specific knowledge is complicated while getting another person to login to the system remotely for a quick look is easy and efficient.  </p>
<p>Time is another interesting factor - onsite visits usually happen during office hours while changes to production are often avoided.  With remote work it is much easier to do work which needs to be done at night hours. </p>
<p>Remote work however also needs to be well organized.  The benefit of onsite work is - it is always planned at very specific time.  Given date and time consultant will be there so both consultant and customer prepare for the visit.  If appointment is just a phone call or online meeting there is larger chance it can be forgotten by ether party.    In many cases the remote work not planned to the specific time at all which can cause it to be delayed because of either party delays. </p>
<p>If you need something to be done fast and you&#8217;re doing it remotely make sure to plan it to exact time and make sure there is someone to assist consultant if he needs any help such as access issues,  some questions about setup or what exactly given queries are doing.  Prompt responses can keep the ball rolling much faster.</p>
<p>Another trick to make remote work successful is to be very clear in your instructions especially if you&#8217;re not going to be available to assist consultant when he is doing the work.  As remote work is often done cross time zones this becomes a very important factor.</p>
<p>In case you have a lot of work done in such &#8220;disconnected&#8221; mode it is a good idea to have daily/weekly/or be-weekly  (depending on project intensity)  calls to get team to discuss the progress and generally get team on the same page.</p>
<p>In general surprisingly a lot of things can be done in completely remote mode - we&#8217;ve done not only basic optimizations but architecture redesigns, large scale deployment, migrations and high available architectures implementation such a way often surprising customers (in a good way) of how little customers the work took. </p>
<p><strong>The Great Mix </strong>  As I mentioned before mixing Onsite and Remote work can be indeed the best mix especially for the complex projects.   Onsite visit is great to setup relationships, get initial understanding of the system and get initial project planning.  After it is done a lot of work can be done remotely quite efficient while there may be the benefit in onsite status-checks and team interactions as well.  </p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by peter |
      <a href="http://www.mysqlperformanceblog.com/2009/07/02/onsite-and-remote-getting-best-of-both-worlds/#comments">One comment</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/07/02/onsite-and-remote-getting-best-of-both-worlds/&amp;title=Onsite and Remote - getting best of both worlds" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/07/02/onsite-and-remote-getting-best-of-both-worlds/&amp;title=Onsite and Remote - getting best of both worlds" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/07/02/onsite-and-remote-getting-best-of-both-worlds/&amp;title=Onsite and Remote - getting best of both worlds" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/07/02/onsite-and-remote-getting-best-of-both-worlds/&amp;T=Onsite and Remote - getting best of both worlds" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/07/02/onsite-and-remote-getting-best-of-both-worlds/&amp;title=Onsite and Remote - getting best of both worlds" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/07/02/onsite-and-remote-getting-best-of-both-worlds/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Scaling w Flash Webinar Recording Available</title>
		<link>http://www.mysqlperformanceblog.com/2009/07/02/scaling-w-flash-webinar-recording-available/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/07/02/scaling-w-flash-webinar-recording-available/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 00:59:14 +0000</pubDate>
		<dc:creator>peter</dc:creator>
		
		<category><![CDATA[conferences]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=711</guid>
		<description><![CDATA[The Scaling with Flash  webinar I&#8217;ve mentioned earlier was a success and we got the recording available.    It contains  Percona presentation,  presentation of Schooner appliances and Q&#038;A session.    Enjoy.
    
    Entry posted by peter &#124;
      [...]]]></description>
			<content:encoded><![CDATA[<p>The Scaling with Flash  <a href="http://www.mysqlperformanceblog.com/2009/06/19/scaling-io-bound-workloads-webinar/">webinar</a> I&#8217;ve mentioned earlier was a success and we got the <a href="https://schooner.webex.com/schooner/ldr.php?AT=pb&#038;SP=MC&#038;rID=30720627&#038;rKey=848208c61469e5f0">recording </a>available.    It contains  Percona presentation,  presentation of Schooner appliances and Q&#038;A session.    Enjoy.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by peter |
      <a href="http://www.mysqlperformanceblog.com/2009/07/02/scaling-w-flash-webinar-recording-available/#comments">One comment</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/07/02/scaling-w-flash-webinar-recording-available/&amp;title=Scaling w Flash Webinar Recording Available" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/07/02/scaling-w-flash-webinar-recording-available/&amp;title=Scaling w Flash Webinar Recording Available" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/07/02/scaling-w-flash-webinar-recording-available/&amp;title=Scaling w Flash Webinar Recording Available" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/07/02/scaling-w-flash-webinar-recording-available/&amp;T=Scaling w Flash Webinar Recording Available" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/07/02/scaling-w-flash-webinar-recording-available/&amp;title=Scaling w Flash Webinar Recording Available" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/07/02/scaling-w-flash-webinar-recording-available/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Gathering queries from a server with Maatkit and tcpdump</title>
		<link>http://www.mysqlperformanceblog.com/2009/07/01/gathering-queries-from-a-server-with-maatkit-and-tcpdump/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/07/01/gathering-queries-from-a-server-with-maatkit-and-tcpdump/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 04:10:24 +0000</pubDate>
		<dc:creator>Baron Schwartz</dc:creator>
		
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=710</guid>
		<description><![CDATA[For the last couple of months, we've been quietly developing a MySQL protocol parser for Maatkit.  It isn't an implementation of the protocol: it's an observer of the protocol.  This lets us gather queries from servers that don't have a slow query log enabled, at very high time resolution.
With this new functionality, it [...]]]></description>
			<content:encoded><![CDATA[<p>For the last couple of months, we've been quietly developing a MySQL protocol parser for Maatkit.  It isn't an implementation of the protocol: it's an observer of the protocol.  This lets us gather queries from servers that don't have a slow query log enabled, at very high time resolution.</p>
<p>With this new functionality, it becomes possible for mk-query-digest to stand on the sidelines and watch queries fly by over TCP.  It is only an observer on the sidelines: it is NOT a man in the middle like mysql-proxy, so it has basically zero impact on the running server (tcpdump is very efficient) and <a href="http://www.mysqlperformanceblog.com/2009/06/09/mysql-proxy-urgh-performance-and-scalability/">zero impact on the query latency</a>.  There are some unique challenges to watching an entire server's traffic, but we've found ways to solve those.  Some of them are harder than others, such as making sense of a conversation when you start listening in the middle.  In general, it's working very well.  We can gather just about every bit of information about queries that mysql-proxy can, making this a viable way to monitor servers without the disadvantages of a proxy.  In theory, we can gather ALL the same information, but in practice we are going for the 95% case.</p>
<p>As always with Maatkit, this has minimal dependencies.  It doesn't require any Net::Pcap or other modules from CPAN.  It's written in pure Perl, and it parses the output of tcpdump, rather than watching the network traffic directly.  This might sound useless, but it's not.  It means you can go tcpdump some traffic on a machine without Perl installed, and copy it to another machine for analysis, or send it via email to your friendly consultant, or do any of a number of other things.  Decoupling things is very helpful sometimes.</p>
<p>Let's see how to gather queries and do something useful with them.  I'll just watch the queries on a sandbox server on my laptop, and print out the profile synopsis so you can see how it works.</p>
<div class="igBar"><span id="lcode-5"><a href="#" onclick="javascript:showPlainTxt('code-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-5">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sudo tcpdump -i lo port <span style="color:#800000;color:#800000;">3306</span> -s <span style="color:#800000;color:#800000;">65535</span> -x -n -q -tttt&gt; tcpdump.<span style="">out</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>I run a few queries, quit, and cancel tcpdump.  Now I've got a file and I'm ready to analyze it.  Let's see:</p>
<div class="igBar"><span id="lcode-6"><a href="#" onclick="javascript:showPlainTxt('code-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-6">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mk-query-digest --type=tcpdump --report-format=profile tcpdump.<span style="">out</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Rank Query ID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Response time&nbsp; &nbsp; Calls&nbsp; &nbsp;R/Call&nbsp; &nbsp; &nbsp;Item</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># ==== ================== ================ ======= ========== ====</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp; <span style="color:#800000;color:#800000;">1</span> 0x088084BF139954D8&nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1009</span> <span style="color:#800000;color:#800000;">90</span>.<span style="color:#800000;color:#800000;">2</span>%&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">1</span>&nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">100881</span> SELECT dual</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp; <span style="color:#800000;color:#800000;">2</span> 0x261703E684370D2C&nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0110</span>&nbsp; <span style="color:#800000;color:#800000;">9</span>.<span style="color:#800000;color:#800000;">8</span>%&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">1</span>&nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">011017</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>I'm kind of showing off the summary profile here to illustrate that you can get really compact results to see what's going on inside your server.  What do you suppose that one query was that took a tenth of a second?  We can find out.</p>
<div class="igBar"><span id="lcode-7"><a href="#" onclick="javascript:showPlainTxt('code-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-7">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mk-query-digest --type=tcpdump --limit <span style="color:#800000;color:#800000;">1</span> tcpdump.<span style="">out</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># 460ms user time, 30ms system time, <span style="color:#800000;color:#800000;">8</span>.88M rss, <span style="color:#800000;color:#800000;">11</span>.79M vsz</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Overall: <span style="color:#800000;color:#800000;">8</span> total, <span style="color:#800000;color:#800000;">6</span> unique, <span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">15</span> QPS, <span style="color:#800000;color:#800000;">0</span>.00x concurrency ________________</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; total&nbsp; &nbsp; &nbsp;min&nbsp; &nbsp; &nbsp;max&nbsp; &nbsp; &nbsp;avg&nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">95</span>%&nbsp; stddev&nbsp; median</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Exec time&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 114ms&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp;101ms&nbsp; &nbsp; 14ms&nbsp; &nbsp;100ms&nbsp; &nbsp; 33ms&nbsp; &nbsp;737us</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Hosts&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">8</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Time range&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">2009</span>-<span style="color:#800000;color:#800000;">07</span>-<span style="color:#800000;color:#800000;">01</span> <span style="color:#800000;color:#800000;">23</span>:<span style="color:#800000;color:#800000;">55</span>:<span style="color:#800000;color:#800000;">41</span>.<span style="color:#800000;color:#800000;">334082</span> to <span style="color:#800000;color:#800000;">2009</span>-<span style="color:#800000;color:#800000;">07</span>-<span style="color:#800000;color:#800000;">01</span> <span style="color:#800000;color:#800000;">23</span>:<span style="color:#800000;color:#800000;">56</span>:<span style="color:#800000;color:#800000;">33</span>.<span style="color:#800000;color:#800000;">929945</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># bytes&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">215</span>&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">14</span>&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">49</span>&nbsp; &nbsp;<span style="color:#800000;color:#800000;">26</span>.<span style="color:#800000;color:#800000;">88</span>&nbsp; &nbsp;<span style="color:#800000;color:#800000;">46</span>.<span style="color:#800000;color:#800000;">83</span>&nbsp; &nbsp; <span style="color:#800000;color:#800000;">9</span>.<span style="color:#800000;color:#800000;">76</span>&nbsp; &nbsp;<span style="color:#800000;color:#800000;">26</span>.<span style="color:#800000;color:#800000;">08</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Errors&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">8</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Rows affe&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Warning c&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>% No_good_index_used</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; <span style="color:#800000;color:#800000;">12</span>% No_index_used</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Query <span style="color:#800000;color:#800000;">1</span>: <span style="color:#800000;color:#800000;">0</span> QPS, 0x concurrency, ID 0x088084BF139954D8 at byte <span style="color:#800000;color:#800000;">7517</span> _____</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># This item is included in the report because it matches --limit.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pct&nbsp; &nbsp;total&nbsp; &nbsp; &nbsp;min&nbsp; &nbsp; &nbsp;max&nbsp; &nbsp; &nbsp;avg&nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">95</span>%&nbsp; stddev&nbsp; median</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Count&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">12</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">1</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Exec time&nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">88</span>&nbsp; &nbsp;101ms&nbsp; &nbsp;101ms&nbsp; &nbsp;101ms&nbsp; &nbsp;101ms&nbsp; &nbsp;101ms&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp;101ms</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Users&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">1</span> msandbox</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Hosts&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">1</span> <span style="color:#800000;color:#800000;">127</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Databases&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">1</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Time range <span style="color:#800000;color:#800000;">2009</span>-<span style="color:#800000;color:#800000;">07</span>-<span style="color:#800000;color:#800000;">01</span> <span style="color:#800000;color:#800000;">23</span>:<span style="color:#800000;color:#800000;">56</span>:<span style="color:#800000;color:#800000;">31</span>.<span style="color:#800000;color:#800000;">022602</span> to <span style="color:#800000;color:#800000;">2009</span>-<span style="color:#800000;color:#800000;">07</span>-<span style="color:#800000;color:#800000;">01</span> <span style="color:#800000;color:#800000;">23</span>:<span style="color:#800000;color:#800000;">56</span>:<span style="color:#800000;color:#800000;">31</span>.<span style="color:#800000;color:#800000;">022602</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># bytes&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">22</span>&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">49</span>&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">49</span>&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">49</span>&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">49</span>&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">49</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">49</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Errors&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">1</span>&nbsp; &nbsp; none</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Rows affe&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Warning c&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>% No_good_index_used</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>% No_index_used</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Query_time distribution</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;1us</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; 10us</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># 100us</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;1ms</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; 10ms</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># 100ms&nbsp; ################################################################</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp; 1s</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; 10s+</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Tables</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp; SHOW TABLE STATUS LIKE <span style="color:#CC0000;">'dual'</span>\G</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp; SHOW CREATE TABLE `dual`\G</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># EXPLAIN</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">select <span style="color:#800000;color:#800000;">1</span> from <span style="color:#006600; font-weight:bold;">&#40;</span> select sleep<span style="color:#006600; font-weight:bold;">&#40;</span>.<span style="color:#800000;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span> from dual <span style="color:#006600; font-weight:bold;">&#41;</span> as x\G </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Indeed, it's no surprise the query took a tenth of a second to execute, and now you see where "SELECT dual" comes from.</p>
<p>Notice that it is inspecting the protocol enough to see the flags set in the protocol, indicating the warning count, error count, rows affected, and whether no index or no good index was available.  Look at the top of the report -- what is up with the 12% of queries that say No_index_used?  If we increase --limit a bit, we can see </p>
<div class="igBar"><span id="lcode-8"><a href="#" onclick="javascript:showPlainTxt('code-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-8">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>% No_good_index_used</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># <span style="color:#800000;color:#800000;">100</span>% No_index_used</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Query_time distribution</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">... <span style="">snip</span> ...</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">show</span> databases\G </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>I did not know that SHOW DATABASES sets the "no index used" flag, did you?  Now we both do!</p>
<p>This is just a brief introduction to what the protocol parser can do.  Of course, in real life it's much more useful than just seeing a query or two -- it has all the power of mk-query-digest for filtering, aggregating, printing and so forth.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Baron Schwartz |
      <a href="http://www.mysqlperformanceblog.com/2009/07/01/gathering-queries-from-a-server-with-maatkit-and-tcpdump/#comments">16 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/07/01/gathering-queries-from-a-server-with-maatkit-and-tcpdump/&amp;title=Gathering queries from a server with Maatkit and tcpdump" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/07/01/gathering-queries-from-a-server-with-maatkit-and-tcpdump/&amp;title=Gathering queries from a server with Maatkit and tcpdump" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/07/01/gathering-queries-from-a-server-with-maatkit-and-tcpdump/&amp;title=Gathering queries from a server with Maatkit and tcpdump" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/07/01/gathering-queries-from-a-server-with-maatkit-and-tcpdump/&amp;T=Gathering queries from a server with Maatkit and tcpdump" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/07/01/gathering-queries-from-a-server-with-maatkit-and-tcpdump/&amp;title=Gathering queries from a server with Maatkit and tcpdump" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/07/01/gathering-queries-from-a-server-with-maatkit-and-tcpdump/feed/</wfw:commentRss>
		</item>
		<item>
		<title>xtrabackup-0.8</title>
		<link>http://www.mysqlperformanceblog.com/2009/07/01/xtrabackup-08/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/07/01/xtrabackup-08/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 15:09:04 +0000</pubDate>
		<dc:creator>Aleksandr Kuzminsky</dc:creator>
		
		<category><![CDATA[Backups]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=709</guid>
		<description><![CDATA[Dear community,
The release 0.8 of the opensource backup tool for InnoDB and XtraDB is available for download.
Key features:

New mode of innobackupex --stream=tar4ibd; new command tar4ibd based on libtar-1.2.11
Experimental option --export is added (see Vadim's post "Impossible - possible, moving InnoDB tables between servers"for details)

tar4ibd is made to be sure that read of InnoDB page is [...]]]></description>
			<content:encoded><![CDATA[<p>Dear community,</p>
<p>The release 0.8 of the opensource backup tool for InnoDB and XtraDB is available for <a href="http://www.percona.com/mysql/xtrabackup/0.8/" target="_blank">download</a>.</p>
<p>Key features:</p>
<ul>
<li>New mode of innobackupex --stream=tar4ibd; new command tar4ibd based on libtar-1.2.11</li>
<li>Experimental option --export is added (see Vadim's post <a rel="bookmark" href="../2009/06/08/impossible-possible-moving-innodb-tables-between-servers/">"Impossible - possible, moving InnoDB tables between servers"</a>for details)</li>
</ul>
<p>tar4ibd is made to be sure that read of InnoDB page is consistent. Before we had some complains what in stream mode some pages are getting corrupted, and we suspect tar can do read of  pages in time when they changed. So we patches libtar to make read consistent.</p>
<p>Export is added to support moving .ibd tablespaces between servers.</p>
<p>The list of other features in the release includes:</p>
<ul>
<li>Support of ARCHIVE tables</li>
<li>Addded incremental option to innobackupex-1.5.1 script</li>
<li>Rollback XA PREPAREd transaction automatically at --prepare</li>
<li>To extend tablespace size, if needed after --prepare</li>
<li>Data page corruption check is added to local backup mode</li>
<li>innobackupex can pass --export option</li>
<li><a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/389360">Bug #389360:</a> innobackupex-1.5.1 accepts scp options</li>
</ul>
<p>Fixed bugs:</p>
<ul>
<li><a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/388062">Bug #388062:</a> Update to innobackupex to include incremental</li>
<li>fix error handling of tar stream</li>
</ul>
<p>The binary packages for RHEL4,5, Debian, FreeBSD as well as source code of the XtraBackup is available on <a href="http://www.percona.com/mysql/xtrabackup/0.8/">http://www.percona.com/mysql/xtrabackup/0.8/</a>.</p>
<p>The project lives on Launchpad : <a href="https://launchpad.net/percona-xtrabackup">https://launchpad.net/percona-xtrabackup</a> and you can report bug to Launchpad bug system:<br />
<a href="https://launchpad.net/percona-xtrabackup/+filebug">https://launchpad.net/percona-xtrabackup/+filebug</a>. The documentation is available on <a href="http://www.percona.com/docs/wiki/percona-xtrabackup:start">our Wiki</a>.</p>
<p>For general questions use our <a href="http://groups.google.com/group/percona-discussion">Pecona-discussions</a> group, and for development question <a href="http://groups.google.com/group/percona-dev">Percona-dev</a> group.</p>
<p>For support, commercial and sponsorship inquiries contact <a href="http://www.percona.com/contacts.html">Percona</a>.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Aleksandr Kuzminsky |
      <a href="http://www.mysqlperformanceblog.com/2009/07/01/xtrabackup-08/#comments">6 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/07/01/xtrabackup-08/&amp;title=xtrabackup-0.8" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/07/01/xtrabackup-08/&amp;title=xtrabackup-0.8" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/07/01/xtrabackup-08/&amp;title=xtrabackup-0.8" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/07/01/xtrabackup-08/&amp;T=xtrabackup-0.8" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/07/01/xtrabackup-08/&amp;title=xtrabackup-0.8" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/07/01/xtrabackup-08/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Few more ideas for InnoDB features</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/29/few-more-ideas-for-innodb-features/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/06/29/few-more-ideas-for-innodb-features/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 03:21:22 +0000</pubDate>
		<dc:creator>Vadim</dc:creator>
		
		<category><![CDATA[ideas]]></category>

		<category><![CDATA[patch]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=708</guid>
		<description><![CDATA[As you see MySQL is doing great in InnoDB performance improvements, so we decided to concentrate more on additional InnoDB features, which will make difference.
Beside ideas I put before http://www.mysqlperformanceblog.com/2009/03/30/my-hot-list-for-next-innodb-features/ (and one of them - moving InnoDB tables between servers are currently under development), we have few mores:
- Stick some InnoDB tables / indexes in [...]]]></description>
			<content:encoded><![CDATA[<p>As you see MySQL is doing great in InnoDB performance improvements, so we decided to concentrate more on additional InnoDB features, which will make difference.</p>
<p>Beside ideas I put before <a href="http://www.mysqlperformanceblog.com/2009/03/30/my-hot-list-for-next-innodb-features/">http://www.mysqlperformanceblog.com/2009/03/30/my-hot-list-for-next-innodb-features/</a> (and one of them - moving InnoDB tables between servers are currently under development), we have few mores:</p>
<p>- Stick some InnoDB tables / indexes in buffer pool, or set priority for InnoDB tables. That means tables with bigger priority will be have more chances to stay in buffer pool  then tables with lower priority. Link to blueprint <a href="https://blueprints.launchpad.net/percona-patches/+spec/lru-priority-patch">https://blueprints.launchpad.net/percona-patches/+spec/lru-priority-patch</a></p>
<p>- Separate LRU list into several lists, and in this way it will allow us to emulate several buffer pool, with features to keep different tables in different buffer pools and also to decrease contention on buffer pool. Link <a href="https://blueprints.launchpad.net/percona-patches/+spec/multiple-lru-patch">https://blueprints.launchpad.net/percona-patches/+spec/multiple-lru-patch</a></p>
<p>- We are looking to include <a href="https://launchpad.net/wafflegrid">Waffle Grid</a> into XtraDB releases with some additional features like caching buffer pool on SSD.</p>
<p>If ideas are interesting for you and you want to support them, <a href="http://www.percona.com/contacts.html">contact us</a></p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Vadim |
      <a href="http://www.mysqlperformanceblog.com/2009/06/29/few-more-ideas-for-innodb-features/#comments">7 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/06/29/few-more-ideas-for-innodb-features/&amp;title=Few more ideas for InnoDB features" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/06/29/few-more-ideas-for-innodb-features/&amp;title=Few more ideas for InnoDB features" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/06/29/few-more-ideas-for-innodb-features/&amp;title=Few more ideas for InnoDB features" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/06/29/few-more-ideas-for-innodb-features/&amp;T=Few more ideas for InnoDB features" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/06/29/few-more-ideas-for-innodb-features/&amp;title=Few more ideas for InnoDB features" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/06/29/few-more-ideas-for-innodb-features/feed/</wfw:commentRss>
		</item>
		<item>
		<title>check-unused-keys: A tool to interact with INDEX_STATISTICS</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/26/check-unused-keys-a-tool-to-interact-with-index_statistics/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/06/26/check-unused-keys-a-tool-to-interact-with-index_statistics/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 21:53:12 +0000</pubDate>
		<dc:creator>Ryan Lowe</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=707</guid>
		<description><![CDATA[With the growing adoption of Google's User Statistics Patch**, the need for supporting scripts has become clear.  To that end, we've created check-unused-keys, a Perl script to provide a nicer interface than directly querying the INFORMATION_SCHEMA database.
check-unused-keys can be invoked and used as follows:

%&#62; check-unused-keys --help
Usage:
     check-unused-keys [OPTIONS]

   [...]]]></description>
			<content:encoded><![CDATA[<p>With the growing adoption of <a href="http://www.mysqlperformanceblog.com/2008/09/12/googles-user_statistics-v2-port-and-changes/" target="#">Google's User Statistics Patch</a>**, the need for supporting scripts has become clear.  To that end, we've created <a href="http://code.google.com/p/check-unused-keys/" target="#">check-unused-keys</a>, a Perl script to provide a nicer interface than <a href="http://www.mysqlperformanceblog.com/2008/09/12/unused-indexes-by-single-query/" target="#">directly querying the INFORMATION_SCHEMA database</a>.</p>
<p>check-unused-keys can be invoked and used as follows:</p>
<pre>
%&gt; check-unused-keys --help
Usage:
     check-unused-keys [OPTIONS]

     Options:
       -d, --databases=&lt;dbname&gt;  Comma-separated list of databases to check
       -h, --help                Display this message and exit
       -H, --hostname=&lt;hostname&gt; The target MySQL server host
       --ignore-databases        Comma-separated list of databases to ignore
       --ignore-indexes          Comma-separated list of indexes to ignore
                                     db_name.tbl_name.index_name
       --ignore-tables           Comma-separated list of tables to ignore
                                     db_name.tbl_name
       --options-file            The options file to use
       -p, --password=&lt;password&gt; The password of the MySQL user
       -i, --port=&lt;portnum&gt;      The port MySQL is listening on
       -s, --socket=&lt;sockfile&gt;   Use the specified mysql unix socket to connect
       -t, --tables=&lt;tables&gt;     Comma-separated list of tables to evaluate
                                     db_name.tbl_name
       --[no]summary             Display summary information
       -u, --username=&lt;username&gt; The MySQL user used to connect
       -v, --verbose             Increase verbosity level
       -V, --version             Display version information and exit

     Defaults are:

     ATTRIBUTE                  VALUE
     -------------------------- ------------------
     databases                  ALL databases
     help                       FALSE
     hostname                   localhost
     ignore-databases           No default value
     ignore-indexes             No default value
     ignore-tables              No default value
     options-file               ~/.my.cnf
     password                   No default value
     port                       3306
     socket                     No default value
     summary                    TRUE
     tables                     No Default Value
     username                   No default value
     verbose                    0 (out of 2)
     version                    FALSE
</pre>
<p>** FULLTEXT indexes are not taken into account by this patch, so be wary.  And, as always, sanity check the suggestions and test thoroughly before making changes to production.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Ryan Lowe |
      <a href="http://www.mysqlperformanceblog.com/2009/06/26/check-unused-keys-a-tool-to-interact-with-index_statistics/#comments">7 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/06/26/check-unused-keys-a-tool-to-interact-with-index_statistics/&amp;title=check-unused-keys: A tool to interact with INDEX_STATISTICS" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/06/26/check-unused-keys-a-tool-to-interact-with-index_statistics/&amp;title=check-unused-keys: A tool to interact with INDEX_STATISTICS" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/06/26/check-unused-keys-a-tool-to-interact-with-index_statistics/&amp;title=check-unused-keys: A tool to interact with INDEX_STATISTICS" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/06/26/check-unused-keys-a-tool-to-interact-with-index_statistics/&amp;T=check-unused-keys: A tool to interact with INDEX_STATISTICS" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/06/26/check-unused-keys-a-tool-to-interact-with-index_statistics/&amp;title=check-unused-keys: A tool to interact with INDEX_STATISTICS" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/06/26/check-unused-keys-a-tool-to-interact-with-index_statistics/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hosting the BOF at Velocity Conference</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/21/hosting-the-bof-at-velocity-conference/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/06/21/hosting-the-bof-at-velocity-conference/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 16:17:03 +0000</pubDate>
		<dc:creator>peter</dc:creator>
		
		<category><![CDATA[conferences]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=705</guid>
		<description><![CDATA[I have not got a chance to have a standard session on Velocity Conference  this year,   However I'm hosting the BOF.  Bring your flash, IO Performance, and general performance stories and questions if you have any.
I also plan to attend the conference afternoon on Monday and mid day on Tuesday.
  [...]]]></description>
			<content:encoded><![CDATA[<p>I have not got a chance to have a standard session on <a href="http://en.oreilly.com/velocity2009">Velocity Conference</a>  this year,   However I'm hosting the <a href="http://en.oreilly.com/velocity2009/public/schedule/detail/10203">BOF</a>.  Bring your flash, IO Performance, and general performance stories and questions if you have any.</p>
<p>I also plan to attend the conference afternoon on Monday and mid day on Tuesday.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by peter |
      <a href="http://www.mysqlperformanceblog.com/2009/06/21/hosting-the-bof-at-velocity-conference/#comments">One comment</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/06/21/hosting-the-bof-at-velocity-conference/&amp;title=Hosting the BOF at Velocity Conference" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/06/21/hosting-the-bof-at-velocity-conference/&amp;title=Hosting the BOF at Velocity Conference" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/06/21/hosting-the-bof-at-velocity-conference/&amp;title=Hosting the BOF at Velocity Conference" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/06/21/hosting-the-bof-at-velocity-conference/&amp;T=Hosting the BOF at Velocity Conference" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/06/21/hosting-the-bof-at-velocity-conference/&amp;title=Hosting the BOF at Velocity Conference" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/06/21/hosting-the-bof-at-velocity-conference/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Scaling IO Bound Workloads Webinar</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/19/scaling-io-bound-workloads-webinar/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/06/19/scaling-io-bound-workloads-webinar/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 03:18:32 +0000</pubDate>
		<dc:creator>peter</dc:creator>
		
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=704</guid>
		<description><![CDATA[I will co-present in webinar  on Performance Challenges and Solutions for IO Bound Workloads in MySQL.    My part of the presentation will be speaking about why switching from CPU bound workload to IO bound is such an important event, how to prepare to it as well as how to keep your [...]]]></description>
			<content:encoded><![CDATA[<p>I will co-present in <a href="http://www1.schoonerinfotech.com/news-and-events/press-releases/schooner-webinar.html">webinar</a>  on Performance Challenges and Solutions for IO Bound Workloads in MySQL.    My part of the presentation will be speaking about why switching from CPU bound workload to IO bound is such an important event, how to prepare to it as well as how to keep your application performance good as the data growths.</p>
<p>The Brian's portion of webinar will focus on the Schooner offering as  example of flash based appliance - one of solutions I mention in my presentation. </p>
<p>It should be interesting whenever you're interested in Schooner appliance offerings, flash or scaling MySQL in General.</p>
<p>You can follow this <a href="http://www1.schoonerinfotech.com/x169.xml">url</a> to register.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by peter |
      <a href="http://www.mysqlperformanceblog.com/2009/06/19/scaling-io-bound-workloads-webinar/#comments">2 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/06/19/scaling-io-bound-workloads-webinar/&amp;title=Scaling IO Bound Workloads Webinar" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/06/19/scaling-io-bound-workloads-webinar/&amp;title=Scaling IO Bound Workloads Webinar" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/06/19/scaling-io-bound-workloads-webinar/&amp;title=Scaling IO Bound Workloads Webinar" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/06/19/scaling-io-bound-workloads-webinar/&amp;T=Scaling IO Bound Workloads Webinar" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/06/19/scaling-io-bound-workloads-webinar/&amp;title=Scaling IO Bound Workloads Webinar" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/06/19/scaling-io-bound-workloads-webinar/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Announcing Percona.tv</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/18/announcing-perconatv/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/06/18/announcing-perconatv/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 18:45:14 +0000</pubDate>
		<dc:creator>Ryan Lowe</dc:creator>
		
		<category><![CDATA[announce]]></category>

		<category><![CDATA[community]]></category>

		<category><![CDATA[conferences]]></category>

		<category><![CDATA[presentation]]></category>

		<category><![CDATA[PerconaTV]]></category>

		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=667</guid>
		<description><![CDATA[Today marks the official launch of Percona.tv.  We'll be uploading technical screencasts, conference video, and anything else cool we can think up.  If you've got ideas or requests, let us know and we'll do our best to accommodate!
    
    Entry posted by Ryan Lowe &#124;
   [...]]]></description>
			<content:encoded><![CDATA[<p>Today marks the official launch of <a href="http://www.percona.tv" target="#">Percona.tv</a>.  We'll be uploading technical screencasts, conference video, and anything else cool we can think up.  If you've got ideas or requests, let us know and we'll do our best to accommodate!</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Ryan Lowe |
      <a href="http://www.mysqlperformanceblog.com/2009/06/18/announcing-perconatv/#comments">7 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/06/18/announcing-perconatv/&amp;title=Announcing Percona.tv" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/06/18/announcing-perconatv/&amp;title=Announcing Percona.tv" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/06/18/announcing-perconatv/&amp;title=Announcing Percona.tv" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/06/18/announcing-perconatv/&amp;T=Announcing Percona.tv" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/06/18/announcing-perconatv/&amp;title=Announcing Percona.tv" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/06/18/announcing-perconatv/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Slow DROP TABLE</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/16/slow-drop-table/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/06/16/slow-drop-table/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 17:55:42 +0000</pubDate>
		<dc:creator>Maciej Dobrzanski</dc:creator>
		
		<category><![CDATA[problems]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=655</guid>
		<description><![CDATA[It is a known fact that ext3 is not the most efficient file system out there and for example file removals can be painfully slow and cause a lot of random I/O. However, as it turns out, it can sometimes have a much more severe impact on the MySQL performance that it would seem. When [...]]]></description>
			<content:encoded><![CDATA[<p>It is a known fact that <em>ext3</em> is not the most efficient file system out there and for example file removals can be painfully slow and cause a lot of random I/O. However, as it turns out, it can sometimes have a much more severe impact on the MySQL performance that it would seem. When or why?</p>
<p>When you run <code>DROP TABLE</code> there are several things that need to happen – write lock on a table so it cannot be used by any other thread, the data file(s) removal by the storage engine and of course in the end MySQL has to destroy the definition file (.frm). That's not all that happens, there is one other thing:</p>
<div class="igBar"><span id="lcode-14"><a href="#" onclick="javascript:showPlainTxt('code-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-14">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">VOID<span style="color:#006600; font-weight:bold;">&#40;</span>pthread_mutex_lock<span style="color:#006600; font-weight:bold;">&#40;</span>&amp;LOCK_open<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">error= mysql_rm_table_part2<span style="color:#006600; font-weight:bold;">&#40;</span>thd, tables, if_exists, drop_temporary, <span style="color:#800000;color:#800000;">0</span>, <span style="color:#800000;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">pthread_mutex_unlock<span style="color:#006600; font-weight:bold;">&#40;</span>&amp;LOCK_open<span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The entire code which removes a table is surrounded by <code>LOCK_open</code> mutex. The mutex is used in various places inside MySQL, but primarily when tables are being opened or closed. It means that when <code>LOCK_open</code> is locked, no query can be executed because they are stopped from accessing any table.</p>
<p>Here is when the slow file removal on the ext3 file system starts to be a pain. Deleting a 10GB file can take a few seconds and if that is a MySQL table, the mutex remains locked for all that time stalling all queries:</p>
<div class="igBar"><span id="lcode-15"><a href="#" onclick="javascript:showPlainTxt('code-15'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-15">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">+-----+------+-----------+------+---------+------+----------------+------------------------------------------------+</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">| Id | User | Host | db | Command | Time | State | Info |</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">+-----+------+-----------+------+---------+------+----------------+------------------------------------------------+</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">| <span style="color:#800000;color:#800000;">1</span> | root | localhost | test | Query | <span style="color:#800000;color:#800000;">7</span> | NULL | drop table large_table | </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">| <span style="color:#800000;color:#800000;">329</span> | root | localhost | test | Query | <span style="color:#800000;color:#800000;">7</span> | Opening tables | select sql_no_cache * from other_table limit <span style="color:#800000;color:#800000;">1</span> | </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">+-----+------+-----------+------+---------+------+----------------+------------------------------------------------+ </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>I tried some alternative approaches to trick MySQL into removing smaller files with <code>DROP TABLE</code> to minimize the effect, such as:</p>
<ul>
<li>TRUNCATE TABLE large_table; ALTER TABLE large_table ENGINE=…; DROP TABLE large_table;</li>
<li>TRUNCATE TABLE large_table; OPTIMIZE TABLE large_table; DROP TABLE large_table;</li>
</ul>
<p>Unfortunately as it turned out each of the administrative commands like <code>ALTER TABLE</code> or <code>OPTIMIZE TABLE</code> one way or another uses <code>LOCK_open</code> mutex when the old table files are deleted:</p>
<div class="igBar"><span id="lcode-16"><a href="#" onclick="javascript:showPlainTxt('code-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-16">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">| <span style="color:#800000;color:#800000;">3</span> | root | localhost | test | Query | <span style="color:#800000;color:#800000;">7</span> | rename result table | ALTER TABLE large_table ENGINE=MyISAM |</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">| <span style="color:#800000;color:#800000;">679</span> | root | localhost | test | Query | <span style="color:#800000;color:#800000;">6</span> | Opening tables | select * from other_table limit <span style="color:#800000;color:#800000;">1</span> | </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The only alternative seems to be changing the file system. To <em>XFS</em> for example, which handles file removals much more efficiently:</p>
<p><strong><font color="blue">EXT3</font></strong></p>
<div class="igBar"><span id="lcode-17"><a href="#" onclick="javascript:showPlainTxt('code-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-17">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mysql&gt; drop table large_table; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Query OK, <span style="color:#800000;color:#800000;">0</span> rows affected <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">7</span>.<span style="color:#800000;color:#800000;">44</span> sec<span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong><font color="blue">XFS</font></strong></p>
<div class="igBar"><span id="lcode-18"><a href="#" onclick="javascript:showPlainTxt('code-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-18">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mysql&gt; drop table large_table;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Query OK, <span style="color:#800000;color:#800000;">0</span> rows affected <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">29</span> sec<span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>A better solution through MySQL internals could be to simulate the table drop by renaming the corresponding data file or files and physically removing them outside of the mutex lock. However it may not be that simple, because the actual removal is performed by the storage engine, so it's not something MySQL code can control.</p>
<p>This is certainly not a common situation, but may become a problem to anyone when it's the least expected (e.g. dropping old unused tables). </p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Maciej Dobrzanski |
      <a href="http://www.mysqlperformanceblog.com/2009/06/16/slow-drop-table/#comments">19 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/06/16/slow-drop-table/&amp;title=Slow DROP TABLE" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/06/16/slow-drop-table/&amp;title=Slow DROP TABLE" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/06/16/slow-drop-table/&amp;title=Slow DROP TABLE" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/06/16/slow-drop-table/&amp;T=Slow DROP TABLE" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/06/16/slow-drop-table/&amp;title=Slow DROP TABLE" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/06/16/slow-drop-table/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
