<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/">

<channel>
  <title>Planet MySQL</title>
  <link>http://www.planetmysql.org/</link>
  <pubDate>Tue, 21 May 2013 05:30:01 +0000</pubDate>
  <language>en</language>
  <description>Planet MySQL - http://www.planetmysql.org/</description>

  <item>
    <title>MyISAM's &amp;quot;table lock&amp;quot; problem, and how InnoDB solves it</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-87087949336034516.post-8074703824119176378</guid>
    <link>http://www.stevemeyers.net/2013/05/myisams-table-lock-problem-and-how.html</link>
    <description>Most serious users of MySQL have moved their tables to InnoDB years ago.  For those who haven't, let's discuss why InnoDB is a more scalable solution than MyISAM.

MyISAM was designed to be very fast for read queries.  It does not handle higher loads of writes very well.  It also suffers a more serious flaw: it isn't crash-safe.  In other words, you better have frequent backups.

MyISAM tables</description>
    <content:encoded><![CDATA[Most serious users of MySQL have moved their tables to InnoDB years ago.  For those who haven't, let's discuss why InnoDB is a more scalable solution than MyISAM.

MyISAM was designed to be very fast for read queries.  It does not handle higher loads of writes very well.  It also suffers a more serious flaw: it isn't crash-safe.  In other words, you better have frequent backups.

MyISAM tables<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79534&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79534&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 21:54:00 +0000</pubDate>
    <dc:creator>Steve Meyers</dc:creator>
  </item>

  <item>
    <title>Why I do what I do?</title>
    <guid isPermaLink="false">http://www.mysqlplus.net/?p=1513</guid>
    <link>http://feedproxy.google.com/~r/mysqlplusrss/~3/sfoYxQt18lI/</link>
    <description>I was sincerely affected by this last MySQL post and this other very long post from Jeremy Cole.
Yes, these two guys are MySQL rock stars and they are really impressives, their involvement in the MySQL community is utter!
I don&amp;#8217;t want to write a long long speech about my simple life&amp;#8230;
I just want to clarify why I do what I do.
Many people have asked or wondered without asking why I do what I do
(Jeremy Cole - 2013)
A few years ago Ashley Unitt asked me what I was most proud of, and now, I can make a complete answer. I&amp;#8217;m very proud to take part of a community, MySQL has transformed my job into a passion and an incredible desire to share this passion, as honestly as possible.
What does it mean in real life?
If I can help in decision making or take part of a discussion, without any bad motivations, independently, I do it!
If the opportunity arises to have a good time over a glass of rosé and discussing open source with Stéphane Varoqui, I do it!
If I have suddenly an idea and a friend with me for several nights and weekends to achieve it, oh yes, I do it!
I do it because it&amp;#8217;s terribly exciting and fun, even if I&amp;#8217;ve just did it for myself&amp;#8230; on a whim.
Yes, I&amp;#8217;m very proud when we made MYXPLAIN.net with Max, I&amp;#8217;m proud to work for an amazing company, I&amp;#8217;m proud to advise someone who challenge me from the other side of the world, I&amp;#8217;m proud to read an email from Rick James in my inbox&amp;#8230;
I&amp;#8217;m proud to be honest!

   
</description>
    <content:encoded><![CDATA[<p>I was sincerely affected by <a href="http://openlife.cc/blogs/2013/may/5-years-mysql" target="_blank">this last MySQL post </a>and this other very long post from <a href="http://blog.jcole.us/2013/04/25/mysql-community-contributor-of-the-year-2013/" target="_blank">Jeremy Cole</a>.<br />
Yes, these two guys are MySQL rock stars and they are really impressives, their involvement in the MySQL community is utter!</p>
<p>I don&#8217;t want to write a long long speech about my simple life&#8230;<br />
I just want to clarify why I do what I do.</p>
<pre>Many people have asked or wondered without asking <em>why</em> I do what I do
(Jeremy Cole - 2013)</pre>
<p>A few years ago Ashley Unitt asked me what I was most proud of, and now, I can make a complete answer. I&#8217;m very proud to take part of a community, MySQL has transformed my job into a passion and an incredible desire to share this passion, as honestly as possible.</p>
<p>What does it mean in real life?</p>
<p>If I can help in decision making or take part of a discussion, without any bad motivations, independently, I do it!</p>
<p>If the opportunity arises to have a good time over a glass of <em>rosé</em> and discussing open source with Stéphane Varoqui, I do it!</p>
<p>If I have suddenly an idea and a friend with me for several nights and weekends to achieve it, oh yes, I do it!</p>
<p>I do it because it&#8217;s terribly exciting and fun, even if I&#8217;ve just did it for myself&#8230; on a whim.</p>
<p>Yes, I&#8217;m very proud when we made <a href="http://www.myxplain.net" target="_blank">MYXPLAIN.net</a> with Max, I&#8217;m proud to work for an amazing company, I&#8217;m proud to advise someone who challenge me from the other side of the world, I&#8217;m proud to read an email from Rick James in my inbox&#8230;</p>
<p>I&#8217;m proud to be honest!</p>
<div>
<a href="http://feeds.feedburner.com/~ff/mysqlplusrss?a=sfoYxQt18lI:scUtanG8Sfk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/mysqlplusrss?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/mysqlplusrss?a=sfoYxQt18lI:scUtanG8Sfk:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/mysqlplusrss?i=sfoYxQt18lI:scUtanG8Sfk:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/mysqlplusrss?a=sfoYxQt18lI:scUtanG8Sfk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/mysqlplusrss?i=sfoYxQt18lI:scUtanG8Sfk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/mysqlplusrss?a=sfoYxQt18lI:scUtanG8Sfk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/mysqlplusrss?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/mysqlplusrss/~4/sfoYxQt18lI" height="1" width="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79533&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79533&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 20:46:37 +0000</pubDate>
    <dc:creator>Cedric PEINTRE</dc:creator>
    <category>Admin</category>
  </item>

  <item>
    <title>Get the Best from Web, Cloud, and Embedded Applications as a MySQL DBA</title>
    <guid isPermaLink="false">https://blogs.oracle.com/MySQL/entry/get_the_best_from_web</guid>
    <link>https://blogs.oracle.com/MySQL/entry/get_the_best_from_web</link>
    <description>After taking this MySQL for Database Administrators course, you will be equipped to use all the features of MySQL to get the best out of your Web, Cloud, and embedded applications, whether you work with the command line or graphical tools such as MySQL Workbench and MySQL Enterprise Monitor, whether your application uses complex queries or the NoSQL API, and whether your preferred challenge is replicated servers or highly-tuned transactional systems.
  You can take this 5-day live instructor-led course as a:
  
    Live-Virtual Event: Take this course from your own desk, no travel required. You can choose from a wide selection of events on the schedule to suit different timezones. 
    In-Class Event: Travel to an education center to attend this class. Below is a selection of events already on the schedule. 
  
  
    
      
        
          
            &amp;nbsp;Location
          
          
            &amp;nbsp;Date
          
          
            &amp;nbsp;Delivery Language
          
        
        
          
            &amp;nbsp;Brussels, Belgium
          
          
            &amp;nbsp;3 June 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;London, England
          
          
            &amp;nbsp;9 September 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Aix-en-Provence, France
          
          
            &amp;nbsp;2 December 2013
          
          
            &amp;nbsp;French
          
        
        
          
            &amp;nbsp;Bordeaux, France
          
          
            &amp;nbsp;2 December 2013
          
          
            &amp;nbsp;French
          
        
        
          
            &amp;nbsp;Nice, France
          
          
            &amp;nbsp;4 November 2013
          
          
            &amp;nbsp;French
          
        
        
          
            &amp;nbsp;Puteaux, France
          
          
            &amp;nbsp;16 September 2013
          
          
            &amp;nbsp;French
          
        
        
          
            &amp;nbsp;Strasbourg, France
          
          
            &amp;nbsp;1 July 2013
          
          
            &amp;nbsp;French
          
        
        
          
            &amp;nbsp;Dresden, Germany
          
          
            &amp;nbsp;3 June 2013
          
          
            &amp;nbsp;German
          
        
        
          
            &amp;nbsp;Dusseldorf, Germany
          
          
            &amp;nbsp;24 June 2013
          
          
            &amp;nbsp;German
          
        
        
          
            &amp;nbsp;Gummersbach, Germany
          
          
            &amp;nbsp;1 July 2013
          
          
            &amp;nbsp;German
          
        
        
          
            &amp;nbsp;Hamburg, Germany
          
          
            &amp;nbsp;24 June 2013
          
          
            &amp;nbsp;German
          
        
        
          
            &amp;nbsp;Munchen, Germany
          
          
            &amp;nbsp;19 August 2013
          
          
            &amp;nbsp;German
          
        
        
          
            &amp;nbsp;Munster, Germany
          
          
            &amp;nbsp;9 September 2013
          
          
            &amp;nbsp;German
          
        
        
          
            &amp;nbsp;Stuttgart, Germany
          
          
            &amp;nbsp;8 July 2013
          
          
            &amp;nbsp;German
          
        
        
          
            &amp;nbsp;Budapest, Hungary
          
          
            &amp;nbsp;4 November&amp;nbsp;2013
          
          
            &amp;nbsp;Hungarian
          
        
        
          
            &amp;nbsp;Belfast, Ireland
          
          
            &amp;nbsp;24 June 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Milan, Italy
          
          
            &amp;nbsp;7 October 2013
          
          
            &amp;nbsp;Italian
          
        
        
          
            &amp;nbsp;Rome, Italy
          
          
            &amp;nbsp;17 June 2013
          
          
            &amp;nbsp;Italian
          
        
        
          
            &amp;nbsp;Utrecht, Netherlands
          
          
            &amp;nbsp;24 June 2013
          
          
            &amp;nbsp;Dutch
          
        
        
          
            &amp;nbsp;Warsaw, Poland
          
          
            &amp;nbsp;5 August 2013
          
          
            &amp;nbsp;Polish
          
        
        
          
            &amp;nbsp;Lisbon, Portugal
          
          
            &amp;nbsp;16 September 2013
          
          
            &amp;nbsp;European Portugese
          
        
        
          
            &amp;nbsp;Cairo, Egypt
          
          
            &amp;nbsp;30 June 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Nairobi, Kenya
          
          
            &amp;nbsp;22 July 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Jakarta, Indonesia
          
          
            &amp;nbsp;16 September 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Petaling Jaya, Malaysia
          
          
            &amp;nbsp;1 July 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Makati City, Philippines
          
          
            &amp;nbsp;3 June 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Melbourne, Australia
          
          
            &amp;nbsp;3 June 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Curitiba, Brazil
          
          
            &amp;nbsp;27 May 2013
          
          
            &amp;nbsp;Brazilian Portugese
          
        
        
          
            &amp;nbsp;Sao Paolo, Brazil
          
          
            &amp;nbsp;10 June 2013
          
          
            &amp;nbsp;Brazilian Portugese
          
        
        
          
            &amp;nbsp;Mexico City, Mexico
          
          
            &amp;nbsp;24 June 2013
          
          
            &amp;nbsp;Spanish
          
        
      
    
  
  To register for this course or to learn more about the courses on the authentic MySQL curriculum, go to http://oracle.com/education/MySQL.</description>
    <content:encoded><![CDATA[<p>After taking this <a title="3" href="http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=609&amp;lang=US&amp;get_params=dc:D61762GC20,p_preview:N&amp;intcmp=WWOU12014584MPP004C024">MySQL for Database Administrators course</a>, you will be equipped to use all the features of MySQL to get the best out of your Web, Cloud, and embedded applications, whether you work with the command line or graphical tools such as MySQL Workbench and MySQL Enterprise Monitor, whether your application uses complex queries or the NoSQL API, and whether your preferred challenge is replicated servers or highly-tuned transactional systems.</p>
  <p>You can take this 5-day live instructor-led course as a:</p>
  <ul>
    <li>Live-Virtual Event: Take this course from your own desk, no travel required. You can choose from a wide selection of events on the schedule to suit different timezones. </li>
    <li>In-Class Event: Travel to an education center to attend this class. Below is a selection of events already on the schedule. </li>
  </ul>
  <p>
    <table border="1" cellspacing="1" cellpadding="1">
      <tbody>
        <tr>
          <td>
            <p align="center"><strong>&nbsp;Location</strong></p>
          </td>
          <td>
            <p align="center"><strong>&nbsp;Date</strong></p>
          </td>
          <td>
            <p align="center"><strong>&nbsp;Delivery Language</strong></p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Brussels, Belgium</p>
          </td>
          <td>
            <p align="center">&nbsp;3 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;London, England</p>
          </td>
          <td>
            <p align="center">&nbsp;9 September 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Aix-en-Provence, France</p>
          </td>
          <td>
            <p align="center">&nbsp;2 December 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;French</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Bordeaux, France</p>
          </td>
          <td>
            <p align="center">&nbsp;2 December 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;French</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Nice, France</p>
          </td>
          <td>
            <p align="center">&nbsp;4 November 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;French</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Puteaux, France</p>
          </td>
          <td>
            <p align="center">&nbsp;16 September 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;French</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Strasbourg, France</p>
          </td>
          <td>
            <p align="center">&nbsp;1 July 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;French</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Dresden, Germany</p>
          </td>
          <td>
            <p align="center">&nbsp;3 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;German</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Dusseldorf, Germany</p>
          </td>
          <td>
            <p align="center">&nbsp;24 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;German</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Gummersbach, Germany</p>
          </td>
          <td>
            <p align="center">&nbsp;1 July 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;German</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Hamburg, Germany</p>
          </td>
          <td>
            <p align="center">&nbsp;24 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;German</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Munchen, Germany</p>
          </td>
          <td>
            <p align="center">&nbsp;19 August 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;German</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Munster, Germany</p>
          </td>
          <td>
            <p align="center">&nbsp;9 September 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;German</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Stuttgart, Germany</p>
          </td>
          <td>
            <p align="center">&nbsp;8 July 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;German</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Budapest, Hungary</p>
          </td>
          <td>
            <p align="center">&nbsp;4 November&nbsp;2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Hungarian</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Belfast, Ireland</p>
          </td>
          <td>
            <p align="center">&nbsp;24 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Milan, Italy</p>
          </td>
          <td>
            <p align="center">&nbsp;7 October 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Italian</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Rome, Italy</p>
          </td>
          <td>
            <p align="center">&nbsp;17 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Italian</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Utrecht, Netherlands</p>
          </td>
          <td>
            <p align="center">&nbsp;24 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Dutch</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Warsaw, Poland</p>
          </td>
          <td>
            <p align="center">&nbsp;5 August 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Polish</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Lisbon, Portugal</p>
          </td>
          <td>
            <p align="center">&nbsp;16 September 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;European Portugese</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Cairo, Egypt</p>
          </td>
          <td>
            <p align="center">&nbsp;30 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Nairobi, Kenya</p>
          </td>
          <td>
            <p align="center">&nbsp;22 July 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Jakarta, Indonesia</p>
          </td>
          <td>
            <p align="center">&nbsp;16 September 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Petaling Jaya, Malaysia</p>
          </td>
          <td>
            <p align="center">&nbsp;1 July 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Makati City, Philippines</p>
          </td>
          <td>
            <p align="center">&nbsp;3 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Melbourne, Australia</p>
          </td>
          <td>
            <p align="center">&nbsp;3 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Curitiba, Brazil</p>
          </td>
          <td>
            <p align="center">&nbsp;27 May 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Brazilian Portugese</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Sao Paolo, Brazil</p>
          </td>
          <td>
            <p align="center">&nbsp;10 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Brazilian Portugese</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Mexico City, Mexico</p>
          </td>
          <td>
            <p align="center">&nbsp;24 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Spanish</p>
          </td>
        </tr>
      </tbody>
    </table>
  </p>
  <p>To register for this course or to learn more about the courses on the authentic MySQL curriculum, go to <a href="http://oracle.com/education/MySQL">http://oracle.com/education/MySQL</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79532&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79532&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 20:03:01 +0000</pubDate>
    <dc:creator>Oracle MySQL Group</dc:creator>
    <category>MySQL Training</category>
    <category>dba</category>
    <category>mysql</category>
    <category>oracle</category>
    <category>training</category>
  </item>

  <item>
    <title>More details on &amp;quot;MySQL 5.6 Experiences&amp;quot; coming soon...</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-3080615211468083537.post-1511826766907652752</guid>
    <link>http://mysqlentomologist.blogspot.com/2013/05/more-details-on-mysql-56-experiences.html</link>
    <description>I've already shared my presentation few hours before I made it during PLMCE 2013, back on April 24. Let's just have it here for the reference: http://www.slideshare.net/ValeriyKravchuk/mysql-56experiencesbugssolutions50mins.During the upcoming weeks I plan to explain every slide in more details (as 50 minutes were not enough for this) here and check status of all the active bugs mentioned in it. I'll also check new bugs for each major feature mentioned (if any). So, stay tuned...</description>
    <content:encoded><![CDATA[I've already shared my <a href="http://www.slideshare.net/ValeriyKravchuk/mysql-56experiencesbugssolutions50mins" target="_blank">presentation</a> few hours before I made it during <a href="http://www.percona.com/live/mysql-conference-2013/home" target="_blank">PLMCE 2013</a>, back on April 24. Let's just have it here for the reference: http://www.slideshare.net/ValeriyKravchuk/mysql-56experiencesbugssolutions50mins.<br /><br />During the upcoming weeks I plan to explain every slide in more details (as 50 minutes were not enough for this) here and check status of all the active bugs mentioned in it. I'll also check new bugs for each major feature mentioned (if any). So, stay tuned...<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79531&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79531&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 18:12:01 +0000</pubDate>
    <dc:creator>Valeriy Kravchuk</dc:creator>
    <category>bugs</category>
    <category>mysql</category>
    <category>5.6 GA</category>
    <category>presentation</category>
  </item>

  <item>
    <title>Webinar: SQL Query Patterns, Optimized</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15532</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/20/webinar-sql-query-patterns-optimized/</link>
    <description>Next Friday, May 31 at 10 a.m. Pacific, I&amp;#8217;ll present Percona&amp;#8217;s next webinar, &amp;#8220;SQL Query Patterns, Optimized.&amp;#8221;Based on my experiences solving tough SQL problems for Percona training and consulting, I&amp;#8217;ll classify several common types of queries with which developers struggle. I&amp;#8217;ll test several SQL solutions for each type of query objective, and show how you can use MySQL 5.6 built-in methods to analyze them for optimal query efficiency.  The discussion will cover optimizer reports, query profiling, and session status to measure performance.The query patterns will include:Exclusion JoinRandom SelectionGreatest-Per-GroupDynamic PivotRelational DivisionPlease register for this webinar and join me next Friday!The post Webinar: SQL Query Patterns, Optimized appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/02/Percona-MySQL-Webinars.jpg"><img class="alignleft  wp-image-12964" alt="Using MySQL 5.6 Performance Schema to Troubleshoot Typical Workload Bottlenecks" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/02/Percona-MySQL-Webinars-285x300.jpg" width="171" height="180" /></a>Next Friday, May 31 at 10 a.m. Pacific, I&#8217;ll present Percona&#8217;s next webinar, &#8220;<a href="http://www.percona.com/webinars/mysql-query-patterns-optimized">SQL Query Patterns, Optimized</a>.&#8221;</p><p>Based on my experiences solving tough SQL problems for <a href="http://www.percona.com/training">Percona training</a> and <a href="http://www.percona.com/mysql-consulting/overview">consulting</a>, I&#8217;ll classify several common types of queries with which developers struggle. I&#8217;ll test several SQL solutions for each type of query objective, and show how you can use MySQL 5.6 built-in methods to analyze them for optimal query efficiency.  The discussion will cover optimizer reports, query profiling, and session status to measure performance.</p><p>The query patterns will include:</p><ul><li>Exclusion Join</li><li>Random Selection</li><li>Greatest-Per-Group</li><li>Dynamic Pivot</li><li>Relational Division</li></ul><p>Please <a href="http://www.percona.com/webinars/mysql-query-patterns-optimized">register for this webinar</a> and join me next Friday!</p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/20/webinar-sql-query-patterns-optimized/">Webinar: SQL Query Patterns, Optimized</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79528&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79528&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 10:00:28 +0000</pubDate>
    <dc:creator>Bill Karwin</dc:creator>
    <category>MySQL</category>
    <category>MySQL Webinars</category>
    <category>Bill Karwin</category>
    <category>Optimizer</category>
    <category>SQL Query Patterns</category>
    <category>Tips</category>
  </item>

  <item>
    <title>New Article on Performance Schema on Dr.Dobbs</title>
    <guid isPermaLink="false">http://www.markleith.co.uk/?p=1208</guid>
    <link>http://www.markleith.co.uk/2013/05/20/new-article-on-performance-schema-on-dr-dobbs/?utm_source=rss&amp;amp;utm_medium=rss&amp;amp;utm_campaign=new-article-on-performance-schema-on-dr-dobbs</link>
    <description>Interested in an introduction to using Performance Schema to profile statement activity on your MySQL instances? Head on over to Detailed Profiling of SQL Activity in MySQL 5.6, which was recently published on the Dr.Dobbs site!</description>
    <content:encoded><![CDATA[<p>Interested in an introduction to using Performance Schema to profile statement activity on your MySQL instances? Head on over to <a href="http://www.drdobbs.com/database/detailed-profiling-of-sql-activity-in-my/240154959?pgno=1" title="Detailed Profiling of SQL Activity in MySQL 5.6">Detailed Profiling of SQL Activity in MySQL 5.6</a>, which was recently published on the Dr.Dobbs site!</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79527&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79527&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 09:06:58 +0000</pubDate>
    <dc:creator>Mark Leith</dc:creator>
    <category>MySQL</category>
  </item>

  <item>
    <title>Easier Overview of Current Performance Schema Setting</title>
    <guid isPermaLink="false">http://mysql.wisborg.dk/?p=148</guid>
    <link>http://mysql.wisborg.dk/2013/05/20/easier-overview-of-current-performance-schema-setting/</link>
    <description>While I prepared for my Hands-On Lab about the Performance Schema at MySQL Connect last year, one of the things that occurred to me was how difficult it was quickly getting an overview of which consumers, instruments, actors, etc. are actually enabled. For the consumers things are made more complicated as the effective setting also depends on parents in the hierarchy. So my thought was: &amp;#8220;How difficult can it be to write a stored procedure that outputs a tree of the hierarchies.&amp;#8221; Well, simple enough in principle, but trying to be general ended up making it into a lengthy project and as it was a hobby project, it often ended up being put aside for more urgent tasks.
However here around eight months later, it is starting to shape up. While there definitely still is work to be done, e.g. creating the full tree and outputting it in text mode (more on modes later) takes around one minute on my test system &amp;#8211; granted I am using a standard laptop and MySQL is running in a VM, so it is nothing sophisticated.
The current routines can be found in ps_tools.sql.gz &amp;#8211; it may later be merged into Mark Leith&amp;#8217;s ps_helper to try to keep the Performance Schema tools collected in one place.
Note: This far the routines have only been tested in Linux on MySQL 5.6.11. Particularly line endings may give problems on Windows and Mac.
Description of the ps_tools Routines
The current status are two views, four stored procedure, and four functions &amp;#8211; not including several functions and procedures that does all the hard work:

Views:

setup_consumers &amp;#8211; Displays whether each consumer is enabled and whether the consumer actually will be collected based on the hierarchy rules described in Pre-Filtering by Consumer in the Reference Manual.
accounts_enabled &amp;#8211; Displays whether each account defined in the mysql.user table has instrumentation enabled based on the rows in performance_schema.setup_actors.


Procedures:

setup_tree_consumers(format, color) &amp;#8211; Create a tree based on setup_consumers displaying whether each consumer is effectively enabled. The arguments are:

format is the output format and can be either (see also below).:

Text: Left-Right
Text: Top-Bottom
Dot: Left-Right
Dot: Top-Bottom


color is whether to add bash color escapes sequences around the consumer names when used a Text format (ignored for Dot outputs).


setup_tree_instruments(format, color, only_enabled, regex_filter) &amp;#8211; Create a tree based on setup_instruments displaying whether each instrument is enabled. The tree is creating by splitting the instrument names at each /. The arguments are:

format is the output format and can be either:

Text: Left-Right
Dot: Left-Right
Dot: Top-Bottom


color is whether to add bash color escapes sequences around the instrument names when used a Text format (ignored for Dot outputs).
type &amp;#8211; whether to base the tree on the ENABLED or TIMED column of setup_instruments.
only_enabled &amp;#8211; if TRUE only the enabled instruments are included.
regex_filter &amp;#8211; if set to a non-empty string only instruments that match the regex will be included.


setup_tree_actors_by_host(format, color) &amp;#8211; Create a tree of each account defined in mysql.user and whether they are enabled; grouped by host. The arguments are:

format is the output format and can be either:

Text: Left-Right
Dot: Left-Right
Dot: Top-Bottom


color is whether to add bash color escape sequences around the names when used a Text format (ignored for Dot outputs).


setup_tree_actors_by_user &amp;#8211; Create a tree of each account defined in mysql.user and whether they are enabled; grouped by username. The arguments are:

format is the output format and can be either:

Text: Left-Right
Dot: Left-Right
Dot: Top-Bottom


color is whether to add bash color escape sequences around the names when used a Text format (ignored for Dot outputs).




Functions:

is_consumer_enabled(consumer_name) &amp;#8211; Returns whether a given consumer is effectively enabled.
is_account_enabled(host, user) &amp;#8211; Returns whether a given account (host, user) is enabled according to setup_actors.
substr_count(haystack, needle, offset, length) &amp;#8211; The number of times a given substring occurs in a string. A port of the PHP function of the same name.
substr_by_delim(set, delimiter, pos) &amp;#8211; Returns the Nth element from a delimiter string.



The two functions substr_count() and substr_by_delim() was also described in an earlier blog.
The formats for the four stored procedures consists of two parts: whether it is Text or Dot and the direction. Text is a tree that can be viewed directly either in the mysql command line client (coloured output not supported) or the shell (colours supported for bash). Dot will output a DOT graph file in the same way as dump_thread_stack() in ps_helper. The direction is as defined in the DOT language, so e.g. Left-Right will have the first level furthest to the left, then add each new level to the right of the parent level.
Examples
As the source code &amp;#8211; including comments &amp;#8211; is more than 1600 lines, I will not discuss it here, but rather go through some examples.
setup_tree_consumers
Using the coloured output:
or the same using a non-coloured output:

setup_tree_instruments
Here a small part of the tree is selected using a regex.
setup_tree_actors_%
With only root@localhost and root@127.0.0.1 enabled, the outputs of setup_tree_actors_by_host and setup_tree_actors_by_user gives respectively:
DOT Graph of setup_instruments
The full tree of setup_instruments can be created using the following sequence of steps (I am using graphviz to get support for dot files):MySQL 5.6.11$ echo -e &quot;$(mysql -NBe &quot;CALL ps_tools.setup_tree_instruments('Dot: Left-Right', FALSE, 'Enabled', FALSE, '')&quot;)&quot; &amp;gt; /tmp/setup_instruments.dot
MySQL 5.6.11$ dot -Tpng /tmp/setup_instruments.dot -o /tmp/setup_instruments.pngThe full output is rather large (6.7M). If you want to see if you can get to it at http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_instruments_dot_lr.png.
Views
mysql&amp;gt; SELECT * FROM ps_tools.setup_consumers;
+--------------------------------+---------+----------+
| NAME                           | ENABLED | COLLECTS |
+--------------------------------+---------+----------+
| events_stages_current          | NO      | NO       |
| events_stages_history          | NO      | NO       |
| events_stages_history_long     | NO      | NO       |
| events_statements_current      | YES     | YES      |
| events_statements_history      | NO      | NO       |
| events_statements_history_long | NO      | NO       |
| events_waits_current           | NO      | NO       |
| events_waits_history           | NO      | NO       |
| events_waits_history_long      | NO      | NO       |
| global_instrumentation         | YES     | YES      |
| thread_instrumentation         | YES     | YES      |
| statements_digest              | YES     | YES      |
+--------------------------------+---------+----------+
12 rows in set (0.00 sec)

mysql&amp;gt; SELECT * FROM ps_tools.accounts_enabled;
+-------------+-----------+---------+
| User        | Host      | Enabled |
+-------------+-----------+---------+
| replication | 127.0.0.1 | NO      |
| root        | 127.0.0.1 | YES     |
| root        | ::1       | NO      |
| meb         | localhost | NO      |
| memagent    | localhost | NO      |
| root        | localhost | YES     |
+-------------+-----------+---------+
6 rows in set (0.00 sec)
Conclusion
There is definitely more work to do on making the Performance Schema easier to access. ps_helper and ps_tools are a great start to what I am sure will be an extensive library of useful diagnostic queries and tools.</description>
    <content:encoded><![CDATA[<p>While I prepared for my <a title="Slides and Other Files From My Hands-On Labs at MySQL Connect 2012" href="http://mysql.wisborg.dk/2012/10/15/slides-and-other-files-from-my-hands-on-labs-at-mysql-connect-2012/" target="_blank">Hands-On Lab about the Performance Schema</a> at <a title="MySQL Connect" href="http://www.oracle.com/mysqlconnect/">MySQL Connect</a> last year, one of the things that occurred to me was how difficult it was quickly getting an overview of which consumers, instruments, actors, etc. are actually enabled. For the consumers things are made more complicated as the effective setting also depends on parents in the hierarchy. So my thought was: &#8220;How difficult can it be to write a stored procedure that outputs a tree of the hierarchies.&#8221; Well, simple enough in principle, but trying to be general ended up making it into a lengthy project and as it was a hobby project, it often ended up being put aside for more urgent tasks.</p>
<p>However here around eight months later, it is starting to shape up. While there definitely still is work to be done, e.g. creating the full tree and outputting it in text mode (more on modes later) takes around one minute on my test system &#8211; granted I am using a standard laptop and MySQL is running in a VM, so it is nothing sophisticated.</p>
<p>The current routines can be found in <a title="ps_tools for MySQL 5.6" href="http://mysql.wisborg.dk/media/ps_tools_56.sql.gz">ps_tools.sql.gz</a> &#8211; it may later be merged into <a title="ps_helper" href="http://www.markleith.co.uk/ps_helper/" target="_blank">Mark Leith&#8217;s ps_helper</a> to try to keep the Performance Schema tools collected in one place.</p>
<p><strong>Note:</strong> This far the routines have only been tested in Linux on MySQL 5.6.11. Particularly line endings may give problems on Windows and Mac.</p>
<h2>Description of the ps_tools Routines</h2>
<p>The current status are two views, four stored procedure, and four functions &#8211; not including several functions and procedures that does all the hard work:</p>
<ul>
<li>Views:
<ul>
<li>setup_consumers &#8211; Displays whether each consumer is enabled and whether the consumer actually will be collected based on the hierarchy rules described in <a title="Pre-Filtering by Consumer" href="https://dev.mysql.com/doc/refman/5.6/en/performance-schema-filtering.html#performance-schema-consumer-filtering" target="_blank"><em>Pre-Filtering by Consume</em></a>r in the Reference Manual.</li>
<li>accounts_enabled &#8211; Displays whether each account defined in the<em> mysql.user</em> table has instrumentation enabled based on the rows in <em>performance_schema.setup_actors</em>.</li>
</ul>
</li>
<li>Procedures:
<ul>
<li>setup_tree_consumers(format, color) &#8211; Create a tree based on <em>setup_consumers</em> displaying whether each consumer is effectively enabled. The arguments are:
<ul>
<li>format is the output format and can be either (see also below).:
<ul>
<li>Text: Left-Right</li>
<li>Text: Top-Bottom</li>
<li>Dot: Left-Right</li>
<li>Dot: Top-Bottom</li>
</ul>
</li>
<li>color is whether to add bash color escapes sequences around the consumer names when used a Text format (ignored for Dot outputs).</li>
</ul>
</li>
<li>setup_tree_instruments(format, color, only_enabled, regex_filter) &#8211; Create a tree based on <em>setup_instruments</em> displaying whether each instrument is enabled. The tree is creating by splitting the instrument names at each /. The arguments are:
<ul>
<li>format is the output format and can be either:
<ul>
<li>Text: Left-Right</li>
<li>Dot: Left-Right</li>
<li>Dot: Top-Bottom</li>
</ul>
</li>
<li>color is whether to add bash color escapes sequences around the instrument names when used a Text format (ignored for Dot outputs).</li>
<li>type &#8211; whether to base the tree on the <em>ENABLED</em> or <em>TIMED</em> column of <em>setup_instruments</em>.</li>
<li>only_enabled &#8211; if <em>TRUE</em> only the enabled instruments are included.</li>
<li>regex_filter &#8211; if set to a non-empty string only instruments that match the regex will be included.</li>
</ul>
</li>
<li>setup_tree_actors_by_host(format, color) &#8211; Create a tree of each account defined in <em>mysql.user</em> and whether they are enabled; grouped by host. The arguments are:
<ul>
<li>format is the output format and can be either:
<ul>
<li>Text: Left-Right</li>
<li>Dot: Left-Right</li>
<li>Dot: Top-Bottom</li>
</ul>
</li>
<li>color is whether to add bash color escape sequences around the names when used a Text format (ignored for Dot outputs).</li>
</ul>
</li>
<li>setup_tree_actors_by_user &#8211; Create a tree of each account defined in <em>mysql.user</em> and whether they are enabled; grouped by username. The arguments are:
<ul>
<li>format is the output format and can be either:
<ul>
<li>Text: Left-Right</li>
<li>Dot: Left-Right</li>
<li>Dot: Top-Bottom</li>
</ul>
</li>
<li>color is whether to add bash color escape sequences around the names when used a Text format (ignored for Dot outputs).</li>
</ul>
</li>
</ul>
</li>
<li>Functions:
<ul>
<li>is_consumer_enabled(consumer_name) &#8211; Returns whether a given consumer is effectively enabled.</li>
<li>is_account_enabled(host, user) &#8211; Returns whether a given account (host, user) is enabled according to <em>setup_actors</em>.</li>
<li>substr_count(haystack, needle, offset, length) &#8211; The number of times a given substring occurs in a string. A port of the PHP function of the same name.</li>
<li>substr_by_delim(set, delimiter, pos) &#8211; Returns the Nth element from a delimiter string.</li>
</ul>
</li>
</ul>
<p>The two functions substr_count() and substr_by_delim() was also described in <a title="A Couple of Substring Functions: substr_count() and substr_by_delim()" href="http://mysql.wisborg.dk/2012/10/22/a-couple-of-substring-functions/" target="_blank">an earlier blog</a>.</p>
<p>The formats for the four stored procedures consists of two parts: whether it is Text or Dot and the direction. Text is a tree that can be viewed directly either in the mysql command line client (coloured output not supported) or the shell (colours supported for bash). Dot will output a DOT graph file in the same way as dump_thread_stack() in ps_helper. The direction is as defined in the DOT language, so e.g. Left-Right will have the first level furthest to the left, then add each new level to the right of the parent level.</p>
<h2>Examples</h2>
<p>As the source code &#8211; including comments &#8211; is more than 1600 lines, I will not discuss it here, but rather go through some examples.</p>
<h3>setup_tree_consumers</h3>
<p>Using the coloured output:</p>
<p><a href="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_consumers_tb.png"><img class="aligncenter size-medium wp-image-161" alt="setup_tree_consumers_tb" src="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_consumers_tb-300x60.png" width="300" height="60" /></a>or the same using a non-coloured output:<br />
<a href="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_consumers_lr.png"><img class="aligncenter  wp-image-168" alt="setup_tree_consumers_lr" src="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_consumers_lr-300x93.png" width="300" height="93" /></a></p>
<h3>setup_tree_instruments</h3>
<p><a href="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_instruments_lr.png"><img class="aligncenter size-medium wp-image-162" alt="setup_tree_instruments_lr" src="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_instruments_lr-300x53.png" width="300" height="53" /></a>Here a small part of the tree is selected using a regex.</p>
<h3>setup_tree_actors_%</h3>
<p>With only root@localhost and root@127.0.0.1 enabled, the outputs of setup_tree_actors_by_host and setup_tree_actors_by_user gives respectively:<a href="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_actors_by_host_lr.png"><img class="aligncenter size-medium wp-image-159" alt="setup_tree_actors_by_host_lr" src="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_actors_by_host_lr-300x97.png" width="300" height="97" /></a><a href="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_actors_by_user_lr.png"><img class="aligncenter size-medium wp-image-160" alt="setup_tree_actors_by_user_lr" src="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_actors_by_user_lr-300x99.png" width="300" height="99" /></a></p>
<h3>DOT Graph of setup_instruments</h3>
<p>The full tree of setup_instruments can be created using the following sequence of steps (I am using graphviz to get support for dot files):</p><pre>MySQL 5.6.11$ echo -e "$(mysql -NBe "CALL ps_tools.setup_tree_instruments('Dot: Left-Right', FALSE, 'Enabled', FALSE, '')")" &gt; /tmp/setup_instruments.dot
MySQL 5.6.11$ dot -Tpng /tmp/setup_instruments.dot -o /tmp/setup_instruments.png</pre><p><a href="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_instruments_dot_lr_snip.png"><img class="aligncenter size-medium wp-image-164" alt="setup_tree_instruments_dot_lr_snip" src="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_instruments_dot_lr_snip-300x81.png" width="300" height="81" /></a>The full output is rather large (6.7M). If you want to see if you can get to it at <a title="DOT generated output of setup_instruments" href="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_instruments_dot_lr.png" target="_blank">http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_instruments_dot_lr.png</a>.</p>
<h3>Views</h3>
<p></p><pre>mysql&gt; SELECT * FROM ps_tools.setup_consumers;
+--------------------------------+---------+----------+
| NAME                           | ENABLED | COLLECTS |
+--------------------------------+---------+----------+
| events_stages_current          | NO      | NO       |
| events_stages_history          | NO      | NO       |
| events_stages_history_long     | NO      | NO       |
| events_statements_current      | YES     | YES      |
| events_statements_history      | NO      | NO       |
| events_statements_history_long | NO      | NO       |
| events_waits_current           | NO      | NO       |
| events_waits_history           | NO      | NO       |
| events_waits_history_long      | NO      | NO       |
| global_instrumentation         | YES     | YES      |
| thread_instrumentation         | YES     | YES      |
| statements_digest              | YES     | YES      |
+--------------------------------+---------+----------+
12 rows in set (0.00 sec)

mysql&gt; SELECT * FROM ps_tools.accounts_enabled;
+-------------+-----------+---------+
| User        | Host      | Enabled |
+-------------+-----------+---------+
| replication | 127.0.0.1 | NO      |
| root        | 127.0.0.1 | YES     |
| root        | ::1       | NO      |
| meb         | localhost | NO      |
| memagent    | localhost | NO      |
| root        | localhost | YES     |
+-------------+-----------+---------+
6 rows in set (0.00 sec)</pre><p></p>
<h2>Conclusion</h2>
<p>There is definitely more work to do on making the Performance Schema easier to access. ps_helper and ps_tools are a great start to what I am sure will be an extensive library of useful diagnostic queries and tools.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79525&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79525&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 04:31:07 +0000</pubDate>
    <dc:creator>Jesper Krogh</dc:creator>
    <category>MySQL</category>
    <category>MySQL 5.6</category>
    <category>MySQL Connect 2012</category>
    <category>Performance Schema</category>
  </item>

  <item>
    <title>Experimenting with MySQL 5.7</title>
    <guid isPermaLink="false">http://www.tocker.ca/2013/05/20/experimenting-with-mysql-5-7.html</guid>
    <link>http://www.tocker.ca/2013/05/20/experimenting-with-mysql-5-7.html</link>
    <description>I was playing around with MySQL 5.7 this weekend and before having read the changelog, I managed to spot these two little gems.

Duplicate Indexes


&amp;#8220;The server now issues a warning if an index is created that duplicates an existing index, or an error in strict SQL mode.&amp;#8221; Bug #37520


Example Testcase:

mysql&amp;gt; SHOW CREATE TABLE city\G
*************************** 1. row ***************************
       Table: city
Create Table: CREATE TABLE `city` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` char(35) NOT NULL DEFAULT &amp;#39;&amp;#39;,
  `CountryCode` char(3) NOT NULL DEFAULT &amp;#39;&amp;#39;,
  `District` char(20) NOT NULL DEFAULT &amp;#39;&amp;#39;,
  `Population` int(11) NOT NULL DEFAULT &amp;#39;0&amp;#39;,
  PRIMARY KEY (`ID`),
  KEY `CountryCode` (`CountryCode`),
  CONSTRAINT `city_ibfk_1` FOREIGN KEY (`CountryCode`) REFERENCES `Country` (`Code`)
) ENGINE=InnoDB AUTO_INCREMENT=4080 DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

mysql&amp;gt; ALTER TABLE city add index (countrycode);
ERROR 1831 (HY000): Duplicate index &amp;#39;CountryCode_2&amp;#39; defined on the table &amp;#39;world.city&amp;#39;. 
This is deprecated and will be disallowed in a future release.

Pretty cool - I know this previously caught a lot of people.

Control-C support in the client


&amp;#8220;Previously, Control+C in mysql interrupted the current statement if there was one, or exited mysql if not. Now Control+C interrupts the current statement if there was one, or cancels any partial input line otherwise, but does not exit.&amp;#8221; Bug #66583


Example Testcase:

mysql&amp;gt; this is a test
    -&amp;gt; test
    -&amp;gt; test
    -&amp;gt; ^C

So if I want to quit, I can now control-C then type &amp;#8220;quit&amp;#8221;. This is much more intuitive.</description>
    <content:encoded><![CDATA[<p>I was playing around with MySQL 5.7 this weekend and before having read the <a href="http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-0.html">changelog</a>, I managed to spot these two little gems.</p>

<h2>Duplicate Indexes</h2>

<blockquote>
<p>&#8220;The server now issues a warning if an index is created that duplicates an existing index, or an error in strict SQL mode.&#8221; <a href="http://bugs.mysql.com/bug.php?id=37520">Bug #37520</a></p>
</blockquote>

<p>Example Testcase:</p>

<pre><code>mysql&gt; SHOW CREATE TABLE city\G
*************************** 1. row ***************************
       Table: city
Create Table: CREATE TABLE `city` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` char(35) NOT NULL DEFAULT &#39;&#39;,
  `CountryCode` char(3) NOT NULL DEFAULT &#39;&#39;,
  `District` char(20) NOT NULL DEFAULT &#39;&#39;,
  `Population` int(11) NOT NULL DEFAULT &#39;0&#39;,
  PRIMARY KEY (`ID`),
  KEY `CountryCode` (`CountryCode`),
  CONSTRAINT `city_ibfk_1` FOREIGN KEY (`CountryCode`) REFERENCES `Country` (`Code`)
) ENGINE=InnoDB AUTO_INCREMENT=4080 DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

mysql&gt; ALTER TABLE city add index (countrycode);
ERROR 1831 (HY000): Duplicate index &#39;CountryCode_2&#39; defined on the table &#39;world.city&#39;. 
This is deprecated and will be disallowed in a future release.</code></pre>

<p>Pretty cool - I know this previously caught a lot of people.</p>

<h2>Control-C support in the client</h2>

<blockquote>
<p>&#8220;Previously, Control+C in mysql interrupted the current statement if there was one, or exited mysql if not. Now Control+C interrupts the current statement if there was one, or cancels any partial input line otherwise, but does not exit.&#8221; <a href="http://bugs.mysql.com/bug.php?id=66583">Bug #66583</a></p>
</blockquote>

<p>Example Testcase:</p>

<pre><code>mysql&gt; this is a test
    -&gt; test
    -&gt; test
    -&gt; ^C</code></pre>

<p>So if I want to quit, I can now control-C then type &#8220;quit&#8221;. This is much more intuitive.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79530&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79530&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 04:00:00 +0000</pubDate>
    <dc:creator>Morgan Tocker</dc:creator>
  </item>

  <item>
    <title>What's the deal with NoSQL?</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-9144505959002328789.post-3086645831197706309</guid>
    <link>http://karlssonondatabases.blogspot.com/2013/05/whats-deal-with-nosql.html</link>
    <description>Everybody seems to be looking at and debating NoSQL these days, and so am I and I thought I'd say a few words about it. Which is not to say I haven't said stuff before, bit them I was mainly targeting specific attributes of many NoSQL solutions (like &quot;eventual consistency&quot; or, as you might call it, &quot;instant inconsistency&quot;, What I was opposing is that &quot;eventual consistency&quot; has anything to do with just that, consistency. Rather, what this means is that at any point in time the system is inconsistent, and even if it might be consistent, you cannot rely on it being so. Which is fine, but don't call it consistency, call it inconsistency. Allowing a database to be somewhat inconsistent doesn't necessarily mean that it's something wrong with it).All this said, what is going on here, why are we MySQL and MariaDB users seeing so many MongoDB, Cassandra and LevelDB applications pop up? Come on, these are typically less functional implementations of a database than even the most basic MySQL setup? No transactions, no joins, no standards etc. etc. And the answer, if you want to hear what I have to say, is ease of use. So let's explore that a bit.Following the Object Orientation frenzy of the 1990s, when any application project ended up consisting of endless sessions modeling objects, usually involving expensive consultants, dresses in expensive, blue suits. And when that was done (which took years!) you had a way cool object model, but no money left to do the actual implementation, i.e. do the real programming (shiver), and you went to some other project and the nicely dressed object design consultant left to see another OO sucker.Now, objects are much more standard, even non-OO languages have a big chunk of OO features, and these are used enhance programmer productivity and better code and design. Which is fine (except that if you were one of those OO consultants, which means you are now out of a job, as such mundane tasks of writing is not something you would ever do, such dirty stuff is better left to &quot;programmers&quot;. Oh no, I forgot that you are now an ITIL consultant, that just slipped my mind) but how does this relate to MySQL and MariaDB. The answer is that MySQL, which was once considered real easy to use, no longer is as easy as it used to be. The Relational data model is still brilliant when you look at data as data, and that is how many of us look at it, so we go through the process of mapping data to objects, if that is what it takes. SQL and Java, PHP or whatever merges, and the application now contains a layer mapping objects to real data. Or we use hibernate, which does this automatically for us.But a new cadre of developers are emerging, and they look at OO as natural and they look at objects as data (it's not. Data, in my mind, should be independent from the application using it, objects on the other hand, are closely tied to the application at hand). With which I do not mean that there is something wrong with building applications using objects, quite the opposite. But if all you know is objects, then using relational technology turns difficult, and SQL, for all the good things with it, seems old-fashioned and arcane, which it is (but it is so widely used you cannot avoid it). So you go with something that looks at objects as all you need, and present that in some object format. Like JSON.And again, there is nothing wrong with that. But if we who are on the SQL and Relational track just discards these NoSQL technologies, we are not making any friends. We have to accept that MySQL and MariaDB really aren't that easy to use anymore, at least not for newcomers.And then there is another thing: Some data, like Big Data, has attributes that really doesn't fit well in a relational model. Data where the attribute of a value can't easily be determined once and for all, and you need to reprocess that data (large test objects, images and maps are some examples). In this case, you really need to extend the relational model, somehow.But SQL-based relational isn't going away. The Relational model is still one of the best ways to look at data, it's just that we also need some other ways of looking at data. And it needs to be easier to access. And we shouldn't really have to push SQL down the throat of every single developer, trying to develop an application using some OO technology. The answer is we need both. And these technologies needs to interoperate. I want to use SQL for my data. But I also want JSON and REST for my data. And there shouldn't be much of a performance overhead. All in all, we SQL folks need to wake up and data easier to use again. We know data better than the Cassandra and MongoDB folks. We know transactions better than them too. But they know how to work with developers who doesn't know who The Beatles were and make Relational easy to use for them, without them having to learn JSON (and now having to listen to a tirade about todays youngsters not knowing what real music is and that it died with John Lennon! What? You don't know who John Lennon was! That's exactly what I mean, you have no taste at all!).Just my 2 cents.../Karlsson</description>
    <content:encoded><![CDATA[Everybody seems to be looking at and debating <b>NoSQL </b>these days, and so am I and I thought I'd say a few words about it. Which is not to say I haven't said stuff before, bit them I was mainly targeting specific attributes of many NoSQL solutions (like "eventual consistency" or, as you might call it, "instant inconsistency", What I was opposing is that "<i>eventual consistency</i>" has anything to do with just that, consistency. Rather, what this means is that at any point in time the system is inconsistent, and even if it might be consistent, you cannot rely on it being so. Which is fine, but don't call it consistency, call it inconsistency. Allowing a database to be somewhat inconsistent doesn't necessarily mean that it's something wrong with it).<br /><br />All this said, what is going on here, why are we <b>MySQL </b>and <b>MariaDB </b>users seeing so many <b>MongoDB</b>, <b>Cassandra </b>and <b>LevelDB </b>applications pop up? Come on, these are typically less functional implementations of a database than even the most basic MySQL setup? No transactions, no joins, no standards etc. etc. And the answer, if you want to hear what I have to say, is ease of use. So let's explore that a bit.<br /><br />Following the Object Orientation frenzy of the 1990s, when any application project ended up consisting of endless sessions modeling objects, usually involving expensive consultants, dresses in expensive, blue suits. And when that was done (which took years!) you had a way cool object model, but no money left to do the actual implementation, i.e. do the real programming (<i>shiver</i>), and you went to some other project and the nicely dressed object design consultant left to see another OO sucker.<br /><br />Now, objects are much more standard, even non-OO languages have a big chunk of OO features, and these are used enhance programmer productivity and better code and design. Which is fine (except that if you were one of those OO consultants, which means you are now out of a job, as such mundane tasks of writing is not something you would ever do, such dirty stuff is better left to "programmers". Oh no, I forgot that you are now an <b>ITIL </b>consultant, that just slipped my mind) but how does this relate to MySQL and MariaDB. The answer is that MySQL, which was once considered real easy to use, no longer is as easy as it used to be. The Relational data model is still brilliant when you look at data as data, and that is how many of us look at it, so we go through the process of mapping data to objects, if that is what it takes. SQL and Java, PHP or whatever merges, and the application now contains a layer mapping objects to real data. Or we use hibernate, which does this automatically for us.<br /><br />But a new cadre of developers are emerging, and they look at OO as natural and they look at objects as data (it's not. Data, in my mind, should be independent from the application using it, objects on the other hand, are closely tied to the application at hand). With which I do not mean that there is something wrong with building applications using objects, quite the opposite. But if all you know is objects, then using relational technology turns difficult, and SQL, for all the good things with it, seems old-fashioned and arcane, which it is (but it is so widely used you cannot avoid it). So you go with something that looks at objects as all you need, and present that in some object format. Like <b>JSON</b>.<br /><br />And again, there is nothing wrong with that. But if we who are on the SQL and Relational track just discards these NoSQL technologies, we are not making any friends. We have to accept that MySQL and MariaDB really aren't that easy to use anymore, at least not for newcomers.<br /><br />And then there is another thing: Some data, like Big Data, has attributes that really doesn't fit well in a relational model. Data where the attribute of a value can't easily be determined once and for all, and you need to reprocess that data (large test objects, images and maps are some examples). In this case, you really need to extend the relational model, somehow.<br /><br />But SQL-based relational isn't going away. The Relational model is still one of the best ways to look at data, it's just that we also need some other ways of looking at data. And it needs to be easier to access. And we shouldn't really have to push SQL down the throat of every single developer, trying to develop an application using some OO technology. The answer is we need both. And these technologies needs to interoperate. I want to use SQL for my data. But I also want JSON and REST for my data. And there shouldn't be much of a performance overhead. All in all, we SQL folks need to wake up and data easier to use again. We know data better than the Cassandra and MongoDB folks. We know transactions better than them too. But they know how to work with developers who doesn't know who <b>The Beatles</b> were and make Relational easy to use for them, without them having to learn JSON (and now having to listen to a tirade about todays youngsters not knowing what <b>real music</b> is and that it died with <b>John Lennon</b>! <i>What? You don't know who John Lennon was! That's exactly what I mean, you have no taste at all!</i>).<br /><br />Just my 2 cents...<br /><br />/Karlsson<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=72792&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=72792&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Sun, 19 May 2013 18:49:00 +0000</pubDate>
    <dc:creator>Anders Karlsson</dc:creator>
    <category>mysql</category>
    <category>json</category>
    <category>mariadb</category>
  </item>

  <item>
    <title>HeidiSQL 8.0 released</title>
    <guid isPermaLink="false">http://www.heidisql.com/rss.php?c=1,7&amp;amp;p=12650</guid>
    <link>http://www.heidisql.com/forum.php?t=12650#p12650</link>
    <description>343 revisions after the 7.0 release follows the new 8.0 release of HeidiSQL now.  Get it from the download page.  Here are the most noticable changes:   - Available in 23 languages now. Thanks to all translators and Transifex hereby! - Database tree: Introduce optional folders for tables, views, routines etc. - Introduce session folders in session manager. - Make routine editor work on MS SQL servers. - Support search and replace in data and query results. - Add support for microseconds in temporal datatypes of MariaDB 5.3+ and MySQL 5.6. - Introduce a query history, available in the right side helpers box. Can be turned off. - Implement grid export as PHP array. - Host &amp;gt; Variables: Add &quot;Global&quot; column, and highlight values different to their session pendant - Add menu item for launching mysql.exe command line with current parameters.   ... and more: - Table editor: Fix handling of BIT default values, and support BIT columns in MS SQL. - Table editor: Improve selection of ENUM and SET default values - User manager: Support dots in database and table privileges - Data grids: Support copying/pasting NULL values - Fix stripped backslashes in VIEW body editor - Apply hotkeys to dialog buttons - Grid export: Remove zero padding to avoid octal =&amp;gt; integer conversion in PHP - Data grid: Propose column names from selected table in filter panel - Database and new table filter above database tree - Table editor: Display number of selected columns in status bar - Database tree: Indicate previously selected tables with a non-ghosted icon in the tree, while leaving never selected ones ghosted - Display timestamp in very right status bar panel when executing a query - Table editor: Add missing DATE and TIME datatypes for MS SQL - Table editor: Support old style &quot;TYPE BTREE&quot; in table index code - Routine editor: Finally fix ramshackle detection of routine body - Data grid: Make foreign values drop down optionally - Dialogs: Introduce &quot;KeepAskingSetting&quot; checkbox - Session manager: Move startup script and local time zone options together with SSL settings to a new &quot;Advanced&quot; tab - SQL export: Support filename and dirname patterns in export target combobox - Database tree: Display overlay icons for some special table engines like federated, csv, aria and performance_schema - Implement an automatic keep-alive ping, to prevent SSH tunnels from disconnecting - Add support for renaming tables in MS SQL - Fix crash on exit when connected to pre-4.1 servers - Table editor: Enhance MS SQL compatibility in table editor - Fix and enhance handling of multiple statements and multiple results - Grid export: Add &quot;Include query&quot; and &quot;Include auto increment column&quot; checkbox options - Processlist: Add link label &quot;EXPLAIN Analyzer on MariaDB.org&quot; - Internal: Refactor logic for reading and writing application and session settings - Session manager: Introduce new columns &quot;Last connect&quot; and &quot;Counter&quot; - Extend the variable editor to explicitly modify strings, numbers, booleans or enumerations - Detect client timezone and send SET time_zone to the server, so that NOW() and friends return UTC-fixed values - Session manager: Add server specific icons for TokuDB, InfiniDB and Infobright - Session handling: Use home brown file format for exporting and importing registry settings, as used for the portable version - Implement usage of mysql_warning_count(). Ask for running SHOW WARNINGS in a new query tab. - Fix command line for Wine users - Introduce new preference option &quot;Prefill empty date/time fields&quot;. - Restore previous selection after refreshing process list (and neighbor tabs)</description>
    <content:encoded><![CDATA[343 revisions after the 7.0 release follows the new 8.0 release of HeidiSQL now.<br /> <br /> Get it from the <a href="http://www.heidisql.com/download.php">download page</a>.<br /> <br /> Here are the most noticable changes:<br /> <br /> <strong><br /> - Available in 23 languages now. Thanks to all translators and Transifex hereby!<br /> - Database tree: Introduce optional folders for tables, views, routines etc.<br /> - Introduce session folders in session manager.<br /> - Make routine editor work on MS SQL servers.<br /> - Support search and replace in data and query results.<br /> - Add support for microseconds in temporal datatypes of MariaDB 5.3+ and MySQL 5.6.<br /> - Introduce a query history, available in the right side helpers box. Can be turned off.<br /> - Implement grid export as PHP array.<br /> - Host &gt; Variables: Add "Global" column, and highlight values different to their session pendant<br /> - Add menu item for launching mysql.exe command line with current parameters.<br /> </strong><br /> <br /> ... and more:<br /> - Table editor: Fix handling of BIT default values, and support BIT columns in MS SQL.<br /> - Table editor: Improve selection of ENUM and SET default values<br /> - User manager: Support dots in database and table privileges<br /> - Data grids: Support copying/pasting NULL values<br /> - Fix stripped backslashes in VIEW body editor<br /> - Apply hotkeys to dialog buttons<br /> - Grid export: Remove zero padding to avoid octal =&gt; integer conversion in PHP<br /> - Data grid: Propose column names from selected table in filter panel<br /> - Database and new table filter above database tree<br /> - Table editor: Display number of selected columns in status bar<br /> - Database tree: Indicate previously selected tables with a non-ghosted icon in the tree, while leaving never selected ones ghosted<br /> - Display timestamp in very right status bar panel when executing a query<br /> - Table editor: Add missing DATE and TIME datatypes for MS SQL<br /> - Table editor: Support old style "TYPE BTREE" in table index code<br /> - Routine editor: Finally fix ramshackle detection of routine body<br /> - Data grid: Make foreign values drop down optionally<br /> - Dialogs: Introduce "KeepAskingSetting" checkbox<br /> - Session manager: Move startup script and local time zone options together with SSL settings to a new "Advanced" tab<br /> - SQL export: Support filename and dirname patterns in export target combobox<br /> - Database tree: Display overlay icons for some special table engines like federated, csv, aria and performance_schema<br /> - Implement an automatic keep-alive ping, to prevent SSH tunnels from disconnecting<br /> - Add support for renaming tables in MS SQL<br /> - Fix crash on exit when connected to pre-4.1 servers<br /> - Table editor: Enhance MS SQL compatibility in table editor<br /> - Fix and enhance handling of multiple statements and multiple results<br /> - Grid export: Add "Include query" and "Include auto increment column" checkbox options<br /> - Processlist: Add link label "EXPLAIN Analyzer on MariaDB.org"<br /> - Internal: Refactor logic for reading and writing application and session settings<br /> - Session manager: Introduce new columns "Last connect" and "Counter"<br /> - Extend the variable editor to explicitly modify strings, numbers, booleans or enumerations<br /> - Detect client timezone and send SET time_zone to the server, so that NOW() and friends return UTC-fixed values<br /> - Session manager: Add server specific icons for TokuDB, InfiniDB and Infobright<br /> - Session handling: Use home brown file format for exporting and importing registry settings, as used for the portable version<br /> - Implement usage of mysql_warning_count(). Ask for running SHOW WARNINGS in a new query tab.<br /> - Fix command line for Wine users<br /> - Introduce new preference option "Prefill empty date/time fields".<br /> - Restore previous selection after refreshing process list (and neighbor tabs)<br /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=72791&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=72791&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Sun, 19 May 2013 09:11:52 +0000</pubDate>
    <dc:creator>Ansgar Becker</dc:creator>
    <category>Anouncements</category>
  </item>

  <item>
    <title>MySQL 5.6, InnoDB and fast storage</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-5915567578707286635.post-796209114341327474</guid>
    <link>http://mysqlha.blogspot.com/2013/05/mysql-56-innodb-and-fast-storage.html</link>
    <description>I used a simple workload with sysbench to determine the rate at which InnoDB can read blocks from disk. The workload is read-only and each query fetches 1 row by PK. The workload was IO-bound with a 2G InnoDB buffer pool and 32G database. Storage was fast courtesy of buffered IO and enough RAM to cache the database in the OS filesystem cache.Using MySQL 5.6.11 and InnoDB with a few hacks the peak throughput was about 240,000 QPS and 210,000 block reads/second. The test server has 32 cores (16 physical cores, 32 logical cores with HT enabled). This is a great result that can probably be even better. Contention on fil_system-&amp;gt;mutex was the bottleneck and I think that can be improved (see feature request&amp;nbsp;#69276). I wonder if 400,000 block reads/second is possible?A few years back, in 2009 or 2010, I ran similar tests using a server with 8 physical cores. I think HT was disabled. Using MySQL 5.1 with the Facebook patch I was able to get about 40,000 QPS and 35,000 block reads/second. It is good to see software advance to keep up with hardware.</description>
    <content:encoded><![CDATA[I used a simple workload with sysbench to determine the rate at which InnoDB can read blocks from disk. The workload is read-only and each query fetches 1 row by PK. The workload was IO-bound with a 2G InnoDB buffer pool and 32G database. Storage was fast courtesy of buffered IO and enough RAM to cache the database in the OS filesystem cache.<br /><br />Using MySQL 5.6.11 and InnoDB with a few hacks the peak throughput was about 240,000 QPS and 210,000 block reads/second. The test server has 32 cores (16 physical cores, 32 logical cores with HT enabled). This is a great result that can probably be even better. Contention on fil_system-&gt;mutex was the bottleneck and I think that can be improved (see feature request&nbsp;<a href="http://bugs.mysql.com/bug.php?id=69276">#69276</a>). I wonder if 400,000 block reads/second is possible?<br /><br />A few years back, in 2009 or 2010, I ran similar tests using a server with 8 physical cores. I think HT was disabled. Using MySQL 5.1 with the Facebook patch I was able to get about 40,000 QPS and 35,000 block reads/second. It is good to see software advance to keep up with hardware.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=72679&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=72679&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Sat, 18 May 2013 22:03:00 +0000</pubDate>
    <dc:creator>Mark Callaghan</dc:creator>
    <category>mysql</category>
  </item>

  <item>
    <title>New Feature Qualification</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-4838504497908987050.post-595533353260171556</guid>
    <link>http://anithagopi.blogspot.com/2013/05/new-feature-qualification.html</link>
    <description>Early this year Oracle released&amp;nbsp; MySQL 5.6 - Best MySQL Release Ever. This release delivered not only quality, but also quantity in terms of number of features. See a comprehensive list here . The blogs below also refer to the massive changes introduced in 5.6http://www.mysqlperformanceblog.com/2013/01/27/mysql-5-6-improvements-in-the-nutshell/http://www.flamingspork.com/blog/2013/03/05/mysql-code-size/ It is no mean task to deliver so many features with high quality that too for a feature rich product like MySQL. This was made possible by the increased focus given to testing during 5.6 development . Testing was integrated far better than in the past with MySQL processes and test team was grown significantly. After the first few milestone releases developers and other stake holders started seeing benefits of the new processes and that resulted in better cooperation between development and test teams which in turn resulted in a bunch of happy testers :). In this post I will take you through the process that was established for new feature qualification. Features are delivered through milestones which Tomas Ulin has explained very well at http://insidemysql.com/the-milestone-release-model-revisited/. MySQL Server QA has the following goals for new featuresComplete functional and non functional test coverage of changed and new functionality No regressionsMore than 80% Code CoverageQA involvement starts as soon as the requirements and specifications of the feature are finalized by the development team. QA reviews available documents and provides feedback on the design, usability, testability etc. A discussion follows with the developer and changes are made as needed to ensure that the feature can be tested.Once the specifications and requirements are acceptable QA starts working on the test plan.&amp;nbsp; First QA documents all scenarios that needs to be tested. This includes stand alone tests, integration tests, non functional tests etc. Next step is to identify tools for automating the scenarios. Most commonly used functional test tools areMTR(mysql-test-run)- Used to cover simple to medium complexity test casesRQG(Random Query Generator) - This is a very powerful tool and is used for concurrency tests, generating large number of SQL queries etcMTR based tests are added by default for any new feature. RQG use started from 5.5 and it gained wide acceptance in 5.6. At least 90% of the features in 5.6 have gone through RQG testing and this helped weed out many bugs which would have been nearly impossible to find using MTR.While the developers are working on the product code , QA engineers start working on the automated tests, test infrastructure improvements etc.Final round of testing starts after the feature has passed code reviews. This phase can last anywhere between a few days to months depending on the complexity of the feature, stability of the code etc. Features gets signed off only when the following conditions are met:No open bugs in the new feature - This is very strictly enforced and even minor bugs are not allowed. We believe that bugs are easiest to fix when the code is new and hence this can help us deliver features that are of high quality. No regressions - A feature gets developed on a tree which gets tested regularly through a continuous integration testing tool. Any regressions are detected and fixed before sign off. Acceptable Code coverage numbers - Code coverage report is generated for the changed lines of code and the minimum expected coverage is 80%. Most features have coverage of more than 90%. Any uncovered lines of code are analyzed and wherever possible new tests are added to increase code coverage.All new tests are added to the automated regression suite.All planned testing has completed with satisfactory results.This process worked really well in 5.6 and we will use our experiences to improve this further and deliver an even better 5.7 !!</description>
    <content:encoded><![CDATA[<div dir="ltr" trbidi="on">Early this year Oracle released&nbsp; <a href="https://blogs.oracle.com/MySQL/entry/the_best_mysql_release_ever">MySQL 5.6 - Best MySQL Release Ever</a>. This release delivered not only quality, but also quantity in terms of number of features. See a comprehensive list <a href="https://blogs.oracle.com/MySQL/entry/mysql_5_6_is_a">here</a> . The blogs below also refer to the massive changes introduced in 5.6<br /><a href="http://www.mysqlperformanceblog.com/2013/01/27/mysql-5-6-improvements-in-the-nutshell/">http://www.mysqlperformanceblog.com/2013/01/27/mysql-5-6-improvements-in-the-nutshell/</a><br /><a href="http://www.flamingspork.com/blog/2013/03/05/mysql-code-size/">http://www.flamingspork.com/blog/2013/03/05/mysql-code-size/ </a><br /><br />It is no mean task to deliver so many features with high quality that too for a feature rich product like MySQL. This was made possible by the increased focus given to testing during 5.6 development . Testing was integrated far better than in the past with MySQL processes and test team was grown significantly. After the first few milestone releases developers and other stake holders started seeing benefits of the new processes and that resulted in better cooperation between development and test teams which in turn resulted in a bunch of happy testers :). In this post I will take you through the process that was established for new feature qualification. <br /><br />Features are delivered through milestones which Tomas Ulin has explained very well at<a href="http://insidemysql.com/the-milestone-release-model-revisited/"> http://insidemysql.com/the-milestone-release-model-revisited/. </a>MySQL Server QA has the following goals for new features<br /><br /><ul><li>Complete functional and non functional test coverage of changed and new functionality </li><li>No regressions</li><li>More than 80% Code Coverage</li></ul>QA involvement starts as soon as the requirements and specifications of the feature are finalized by the development team. QA reviews available documents and provides feedback on the design, usability, testability etc. A discussion follows with the developer and changes are made as needed to ensure that the feature can be tested.<br /><br />Once the specifications and requirements are acceptable QA starts working on the test plan.&nbsp; First QA documents all scenarios that needs to be tested. This includes stand alone tests, integration tests, non functional tests etc. Next step is to identify tools for automating the scenarios. Most commonly used functional test tools are<br /><br /><ul><li><a href="http://dev.mysql.com/doc/mysqltest/2.0/en/mysql-test-run-pl.html">MTR(mysql-test-run)</a>- Used to cover simple to medium complexity test cases</li><li><a href="https://github.com/RQG/RQG-Documentation/wiki/Category%3ARandomQueryGenerator">RQG(Random Query Generator)</a> - This is a very powerful tool and is used for concurrency tests, generating large number of SQL queries etc</li></ul>MTR based tests are added by default for any new feature. RQG use started from 5.5 and it gained wide acceptance in 5.6. At least 90% of the features in 5.6 have gone through RQG testing and this helped weed out many bugs which would have been nearly impossible to find using MTR.<br /><br />While the developers are working on the product code , QA engineers start working on the automated tests, test infrastructure improvements etc.Final round of testing starts after the feature has passed code reviews. This phase can last anywhere between a few days to months depending on the complexity of the feature, stability of the code etc. <br /><br />Features gets signed off only when the following conditions are met:<br /><ul><li>No open bugs in the new feature - This is very strictly enforced and even minor bugs are not allowed. We believe that bugs are easiest to fix when the code is new and hence this can help us deliver features that are of high quality. </li><li>No regressions - A feature gets developed on a tree which gets tested regularly through a continuous integration testing tool. Any regressions are detected and fixed before sign off. </li><li>Acceptable Code coverage numbers - Code coverage report is generated for the changed lines of code and the minimum expected coverage is 80%. Most features have coverage of more than 90%. Any uncovered lines of code are analyzed and wherever possible new tests are added to increase code coverage.</li><li>All new tests are added to the automated regression suite.</li><li>All planned testing has completed with satisfactory results.</li></ul>This process worked really well in 5.6 and we will use our experiences to improve this further and deliver an even better 5.7 !!<br /><ul></ul><ul></ul><ul></ul></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=71759&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=71759&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Sat, 18 May 2013 11:00:00 +0000</pubDate>
    <dc:creator>Anitha Gopi</dc:creator>
    <category>MySQL testing</category>
  </item>

  <item>
    <title>MySQL binlogs - Don't forget to do your homework!</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-8932703.post-5987183006125074923</guid>
    <link>http://opendba.blogspot.com/2013/05/mysql-binlogs-dont-forget-to-do-your.html</link>
    <description>Now that I'm back doing just database stuff, I've come to realize I've gotten a little sloppy about doing my homework.  Homework's never been my favorite thing in the world, but it often reduces stress when your under the gun during an outage or upgrade...



We had a MySQL database server that's been slow on DML changes, and based on the slowest statements being 'COMMIT', we had a good mind</description>
    <content:encoded><![CDATA[Now that I'm back doing just database stuff, I've come to realize I've gotten a little sloppy about doing my homework.  Homework's never been my favorite thing in the world, but it often reduces stress when your under the gun during an outage or upgrade...



We had a MySQL database server that's been slow on DML changes, and based on the slowest statements being 'COMMIT', we had a good mind<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=70636&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=70636&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Sat, 18 May 2013 04:34:00 +0000</pubDate>
    <dc:creator>Phil Hildebrand</dc:creator>
    <category>MySQL</category>
    <category>Maintenance</category>
    <category>Replication</category>
    <category>Configuration</category>
    <category>Troubleshooting</category>
  </item>

  <item>
    <title>Percona XtraBackup 2.1.2 for MySQL available for download</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15500</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/18/percona-xtrabackup-2-1-2-for-mysql-available-for-download/</link>
    <description> Percona is glad to announce the release of Percona XtraBackup 2.1.2 for MySQL on May 18, 2013. Downloads are available from our download site here and Percona Software Repositories.This release fixes number of high-priority bugs since version 2.1 became GA. It’s advised to upgrade your latest 2.1 version to 2.1.2. This release is the latest stable release in the 2.1 series.Bugs Fixed:Using Perl’s DBD::MySQL package for server communication instead of spawning the MySQL command line client introduced a regression which caused innobackupex &amp;#8211;galera-info option to fail. Bug fixed #1180672.The format of xtrabackup_galera_info was missing the ‘:’ separator between the values of wsrep_local_state_uuid and wsrep_last_committed. Bug fixed #1181222.innobackupex automatic version detection did not work correctly for latest Percona Server and MySQL 5.1 releases which could cause innobackupex to fail. Bugs fixed #1181092, #1181099 and #1180905.When backing up a server that is not a replication slave with the innobackupex &amp;#8211;slave-info option, innobackupex failed with a fatal error. Replaced the fatal error with a diagnostic message about innobackupex &amp;#8211;slave-info being ignored in such a case. Bug fixed #1180662.Low values for wait_timeout on the server could cause server to close the connection while backup is being taken. Fixed by setting the bigger value for wait_timeout option on the server to prevent server from closing connections if the global wait_timeout value is set too low. Bug fixed #1180922.Other bug fixes: bug fixed #1177182.Release notes with all the bugfixes for Percona XtraBackup 2.1.2 are available in our online documentation. Bugs can be reported on the launchpad bug tracker.The post Percona XtraBackup 2.1.2 for MySQL available for download appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/01/Percona_XtraBackup.jpg"><img class="alignleft  wp-image-12668" style="margin-top: 5px; margin-bottom: 5px;" alt="Percona XtraBackup for MySQL" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/01/Percona_XtraBackup.jpg" width="206" height="78" /></a> <em>Percona</em> is glad to announce the release of <a href="http://www.percona.com/software/percona-xtrabackup">Percona XtraBackup</a> 2.1.2 for MySQL on May 18, 2013. Downloads are available from our download site <a href="http://www.percona.com/downloads/XtraBackup/XtraBackup-2.1.2/">here</a> and <a href="file:/home/hrvoje/src/xtrabackup/rn-2.1.2/doc/build/html/installation.html">Percona Software Repositories</a>.</p><p>This release fixes number of high-priority bugs since version 2.1 became GA. It’s advised to upgrade your latest 2.1 version to 2.1.2. This release is the latest stable release in the 2.1 series.</p><p>Bugs Fixed:</p><ul><li>Using Perl’s <code>DBD::MySQL</code> package for server communication instead of spawning the <em>MySQL</em> command line client introduced a regression which caused innobackupex &#8211;galera-info option to fail. Bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1180672">#1180672</a>.</li><li>The format of <code>xtrabackup_galera_info</code> was missing the ‘:’ separator between the values of <code>wsrep_local_state_uuid</code> and <code>wsrep_last_committed</code>. Bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1181222">#1181222</a>.</li><li><strong>innobackupex</strong> automatic version detection did not work correctly for latest <em>Percona Server</em> and <em>MySQL</em> 5.1 releases which could cause innobackupex to fail. Bugs fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1181092">#1181092</a>, <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1181099">#1181099</a> and <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1180905">#1180905</a>.</li><li>When backing up a server that is not a replication slave with the innobackupex &#8211;slave-info option, <strong>innobackupex</strong> failed with a fatal error. Replaced the fatal error with a diagnostic message about innobackupex &#8211;slave-info being ignored in such a case. Bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1180662">#1180662</a>.</li><li>Low values for <code>wait_timeout</code> on the server could cause server to close the connection while backup is being taken. Fixed by setting the bigger value for <code>wait_timeout</code> option on the server to prevent server from closing connections if the global <code>wait_timeout</code> value is set too low. Bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1180922">#1180922</a>.</li></ul><p>Other bug fixes: bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1177182">#1177182</a>.</p><p>Release notes with all the bugfixes for <em>Percona XtraBackup</em> 2.1.2 are available in our <a href="http://www.percona.com/doc/percona-xtrabackup/release-notes/2.1/2.1.2.html">online documentation</a>. Bugs can be reported on the <a href="https://bugs.launchpad.net/percona-xtrabackup/+filebug">launchpad bug tracker</a>.</p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/18/percona-xtrabackup-2-1-2-for-mysql-available-for-download/">Percona XtraBackup 2.1.2 for MySQL available for download</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=70635&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=70635&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Sat, 18 May 2013 04:25:53 +0000</pubDate>
    <dc:creator>MySQL Performance Blog</dc:creator>
    <category>MySQL</category>
    <category>Percona Software</category>
    <category>Percona XtraBackup</category>
    <category>DBD</category>
    <category>innobackupex</category>
    <category>Perl</category>
  </item>

  <item>
    <title>OurSQL Episode 140: More Performance</title>
    <guid isPermaLink="false">1245 at http://technocation.org</guid>
    <link>http://technocation.org/content/oursql-episode-140%3A-more-performance</link>
    <description>This week we explain performance_schema a bit deeper. In Ear Candy, we talk about max_binlog_cache_size and At the Movies presents Max Mether of SkySQL talking about &quot;High Availability Solutions for MySQL&quot;.
Events
DB Hangops - every other Wednesay at noon Pacific time
Upcoming MySQL events
Training
SkySQL Trainings
Tungsten University trainings
read more</description>
    <content:encoded><![CDATA[<p>This week we explain performance_schema a bit deeper. In Ear Candy, we talk about max_binlog_cache_size and At the Movies presents Max Mether of SkySQL talking about "High Availability Solutions for MySQL".</p>
<p><strong>Events</strong><br />
<a href="http://dbahangops.com">DB Hangops</a> - every other Wednesay at noon Pacific time<br />
<a href="http://www.mysql.com/news-and-events/events/">Upcoming MySQL events</a></p>
<p><strong>Training</strong><br />
<a href="http://www.skysql.com/services/training/schedule">SkySQL Trainings</a><br />
<a href="https://docs.continuent.com/wiki/display/TEDOC/Tungsten+University">Tungsten University trainings</a></p>
<p><a href="http://technocation.org/content/oursql-episode-140%3A-more-performance">read more</a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=70429&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=70429&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 17 May 2013 18:20:13 +0000</pubDate>
    <dc:creator>Technocation</dc:creator>
    <category>Podcasts</category>
    <category>Performance</category>
  </item>

  <item>
    <title>Log Buffer #320, A Carnival of the Vanities for DBAs</title>
    <guid isPermaLink="false">http://www.pythian.com/blog/?p=55171</guid>
    <link>http://www.pythian.com/blog/log-buffer-320-a-carnival-of-the-vanities-for-dbas/</link>
    <description>The red carpet has been laid down at this Log Buffer Edition, and you can witness and cheer the cat-walking blog posts from Oracle, SQL Server and MySQL. Every one of them is chic, elegant, sensual in its own right. Enjoy.
Oracle:
Create colored heat maps in SQL*Plus with Kyle Hailey.
Hereâ€™s a quick and dirty script to create a procedure (in the SYS schema â€“ so be careful) to check the Hakan Factor for an object.
Connor has a good post about default null for collection parameter.
This is yet another blogpost on Oracleâ€™s direct path read feature which was introduced for non-parallel query processes in Oracle version 11.
Owen Allen has seen some questions about provisioning Oracle Solaris 11. They boil down to this.
SQL Server:
Shashank Srivastava tells us as how to Change the SQL Server Instance Name after Renaming the Windows Host.
Daniel Calbimonte shares as how to synchronize two SSAS Servers.
Data Architecture underpins just about everything we do in IT.Â  Without a clear understanding of how data is structured, there is no reliable way to derive meaning from it.
Orlando Colamatteo is login-less in Seattle.
Lets get started testing database with tSQLt with Robert Sheldon.
MySQL:
After a lot of fuzz, Anders Karlsson is now releasing MyQuery version 3.5.1.
Nothing like reestablishing a tradition and Dave Stokes is doing just that for MySQL.
Mare Alff is spreading the word about the performance schema.
Slava Akhmechet talks about secondary indexes, batched inserts performance improvements, soft durability mode.
It is a central part of the MySQL philosophy to try and help you as much as you can. There are many occasions when it could tell you that what you are asking for is utterly stupid or give you a bad execution plan because &amp;#8220;you asked for it&amp;#8221;.
</description>
    <content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>The red carpet has been laid down at this Log Buffer Edition, and you can witness and cheer the cat-walking blog posts from Oracle, SQL Server and MySQL. Every one of them is chic, elegant, sensual in its own right. Enjoy.<br />
<span></span><strong>Oracle:</strong></p>
<p>Create colored heat maps in SQL*Plus with <a href="http://dboptimizer.com/2013/05/10/colored-heat-maps-in-sqlplus/">Kyle Hailey.</a></p>
<p>Hereâ€™s a quick and dirty script to create a procedure (in the SYS schema â€“ so be careful) to check the <a href="http://jonathanlewis.wordpress.com/2013/05/10/hakan-factor/">Hakan</a> Factor for an object.</p>
<p><a href="http://connormcdonald.wordpress.com/2013/05/13/default-null-for-collection-parameter/">Connor</a> has a good post about default null for collection parameter.</p>
<p>This is yet another blogpost on <a href="http://fritshoogland.wordpress.com/2013/05/09/direct-path-read-and-fast-full-index-scans/">Oracle</a>â€™s direct path read feature which was introduced for non-parallel query processes in Oracle version 11.</p>
<p>Owen Allen has seen some questions about provisioning Oracle Solaris 11. They boil down to <a href="https://blogs.oracle.com/opscenter/entry/provisioning_oracle_solaris_111">this</a>.</p>
<p><strong>SQL Server:</strong></p>
<p><a href="http://www.sqlservercentral.com/articles/Administration/98346/">Shashank Srivastava</a> tells us as how to Change the SQL Server Instance Name after Renaming the Windows Host.</p>
<p><a href="http://www.mssqltips.com/sqlservertip/2938/how-to-synchronize-two-ssas-servers/">Daniel Calbimonte</a> shares as how to synchronize two SSAS Servers.</p>
<p><a href="http://dataarch.sqlpass.org/">Data</a> Architecture underpins just about everything we do in IT.Â  Without a clear understanding of how data is structured, there is no reliable way to derive meaning from it.</p>
<p><a href="http://www.sqlservercentral.com/articles/Security/98202/">Orlando Colamatteo</a> is login-less in Seattle.</p>
<p>Lets get started testing database with tSQLt with <a href="https://www.simple-talk.com/sql/t-sql-programming/getting-started-testing-databases-with-tsqlt/">Robert Sheldon</a>.</p>
<p><strong>MySQL:</strong></p>
<p>After a lot of fuzz, Anders Karlsson is now releasing <a href="http://karlssonondatabases.blogspot.com/2013/05/myquery-351-beta-released.html">MyQuery</a> version 3.5.1.</p>
<p>Nothing like reestablishing a tradition and Dave Stokes is doing just that for <a href="http://opensourcedba.wordpress.com/2013/05/16/reestablishing-a-mysql-tradition/">MySQL</a>.</p>
<p><a href="http://marcalff.blogspot.com/2013/05/spreading-word-about-performance-schema.html">Mare Alff</a> is spreading the word about the performance schema.</p>
<p><a href="http://rethinkdb.com/blog/1.5-release">Slava Akhmechet</a> talks about secondary indexes, batched inserts performance improvements, soft durability mode.</p>
<p>It is a central part of the <a href="http://optimize-this.blogspot.com/2013/05/the-outer-join-to-inner-join-coversion.html">MySQL</a> philosophy to try and help you as much as you can. There are many occasions when it could tell you that what you are asking for is utterly stupid or give you a bad execution plan because &#8220;you asked for it&#8221;.</p>
</div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=69919&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=69919&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 17 May 2013 12:23:12 +0000</pubDate>
    <dc:creator>The Pythian Group</dc:creator>
    <category>Log Buffer</category>
    <category>MySQL</category>
    <category>Oracle</category>
    <category>SQL Server</category>
  </item>

  <item>
    <title>Replication Enhancements in MySQL 5.7: SHOW SLAVE STATUS NONBLOCKING</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-200162575501976303.post-3983276756436665644</guid>
    <link>http://myhadds.blogspot.com/2013/05/replication-enhancements-in-mysql-57.html</link>
    <description>2013 is on it's initial months and we already have 5.6 GA and the first release of 5.7, 5.7.1 DMR with lots of exciting new features, future is promising!A new feature added in replication was the NONBLOCKING option to SHOW SLAVE STATUS command.In the past if we stop slave during a big transaction, until the transaction was applied we cannot execute SHOW SLAVE STATUS to see the slave progress. The latter operation would block until the former finish, this would disable all external monitoring or third-party applications that need a immediate response from server.To solve this problem, NONBLOCKING option was added to SHOW SLAVE STATUS, when it is used we can obtain immediate response from server about slave progress. As a tradeoff, the returned info may not be the latest data but it won't block waiting for STOP SLAVE.This enhancement and many more can be downloaded from MySQL development releases page.</description>
    <content:encoded><![CDATA[2013 is on it's initial months and we already have 5.6 GA and the first release of 5.7, 5.7.1 DMR with lots of exciting <a href="http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-1.html" target="_blank">new features</a>, future is promising!<br /><br />A new feature added in replication was the NONBLOCKING option to SHOW SLAVE STATUS command.<br /><br />In the past if we stop slave during a big transaction, until the transaction was applied we cannot execute SHOW SLAVE STATUS to see the slave progress. The latter operation would block until the former finish, this would disable all external monitoring or third-party applications that need a immediate response from server.<br /><br />To solve this problem, NONBLOCKING option was added to <a href="http://dev.mysql.com/doc/refman/5.7/en/show-slave-status.html" target="_blank">SHOW SLAVE STATUS</a>, when it is used we can obtain immediate response from server about slave progress. As a tradeoff, the returned info may not be the latest data but it won't block waiting for STOP SLAVE.<br /><br />This enhancement and many more can be downloaded from MySQL <a href="http://dev.mysql.com/downloads/mysql/5.7.html" target="_blank">development releases page</a>.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=69920&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=69920&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 17 May 2013 11:17:00 +0000</pubDate>
    <dc:creator>Nuno Carvalho</dc:creator>
    <category>MySQL</category>
    <category>replication</category>
  </item>

  <item>
    <title>Virident vCache vs. FlashCache: Part 2</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15474</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/17/virident-vcache-vs-flashcache-part-2/</link>
    <description>This is the second part in a two-part series comparing Virident&amp;#8217;s vCache to FlashCache. The first part was focused on usability and feature comparison; in this post, we&amp;#8217;ll look at some sysbench test results.Disclosure: The research and testing conducted for this post were sponsored by Virident.First, some background information. All tests were conducted on Percona&amp;#8217;s Cisco UCS C250 test machine, and both the vCache and FlashCache tests used the same 2.2TB Virident FlashMAX II as the cache storage device. EXT4 is the filesystem, and CentOS 6.4 the operating system, although the pre-release modules I received from Virident required the use of the CentOS 6.2 kernel, 2.6.32-220, so that was the kernel in use for all of the benchmarks on both systems. The benchmark tool used was sysbench 0.5 and the version of MySQL used was Percona Server 5.5.30-rel30.1-465. Each test was allowed to run for 7200 seconds, and the first 3600 seconds were discarded as warmup time; the remaining 3600 seconds were averaged into 10-second intervals. All tests were conducted with approximately 78GiB of data (32 tables, 10M rows each) and a 4GiB buffer pool. The cache devices were flushed to disk immediately prior to and immediately following each test run.With that out of the way, let&amp;#8217;s look at some numbers.vCache vs. vCache &amp;#8211; MySQL parameter testingThe first test was designed to look solely at vCache performance under some different sets of MySQL configuration parameters. For example, given that the front-end device is a very fast PCIe SSD, would it make more sense to configure MySQL as if it were using SSD storage or to just use an optimized HDD storage configuration? After creating a vCache device with the default configuration, I started with a baseline HDD configuration for MySQL (configuration A, listed at the bottom of this post) and then tried three additional sets of experiments. First, the baseline configuration plus:  innodb_read_io_threads = 16 innodb_write_io_threads = 16  We call this configuration B. The next one contained four SSD-specific optimizations based partially on some earlier work that I&amp;#8217;d done with this Virident card (configuration C):  innodb_io_capacity = 30000 innodb_adaptive_flushing_method = keep_average innodb_flush_neighbor_pages=none innodb_max_dirty_pages_pct = 60  And then finally, a fourth test (configuration D) which combined the parameter changes from tests B and C. The graph below shows the sysbench throughput (tps) for these four configurations:  As we can see, all of the configuration options produce numbers that, in the absence of outliers, are roughly identical, but it&amp;#8217;s configuration C (shown in the graph as the blue line &amp;#8211; SSD config) which shows the most consistent performance. The others all have assorted performance drops scattered throughout the graph. We see the exact same pattern when looking at transaction latency; the baseline numbers are roughly identical for all four configurations, but configuration C avoids the spikes and produces a very constant and predictable result.vCache vs. FlashCache &amp;#8211; the basicsOnce I&amp;#8217;d determined that configuration C appeared to produce the most optimal results, I moved on to reviewing FlashCache performance versus that of vCache, and I also included a &amp;#8220;no cache&amp;#8221; test run as well using the base HDD MySQL configuration for purposes of comparison. Given the apparent differences in time-based flushing in vCache and FlashCache, both cache devices were set up so that time-based flushing was disabled. Also, both devices were set up such that all IO would be cached (i.e., no special treatment of sequential writes) and with a 50% dirty page threshold. Again, for comparison purposes, I also include the numbers from the vCache test where the time-based flushing is enabled.As we&amp;#8217;d expect, the HDD-only solution barely registered on the graph. With a buffer pool that&amp;#8217;s much smaller than the working set, the no-cache approach is fairly crippled and ineffectual. FlashCache does substantially better, coming in at an average of around 600 tps, but vCache is about 3x better. The interesting item here is that vCache with time-based flushing enabled actually produces better and more consistent performance than vCache without time-based flushing, but even at its worst, the vCache test without time-based flushing still outperforms FlashCache by over 2x, on average.Looking just at sysbench reads, vCache with time-based flushing consistently hit about 27000 per second, whereas without time-based flushing it averaged about 12500. FlashCache came in around 7500 or so. Sysbench writes came in just under 8000 for vCache + time-based flushing, around 6000 for vCache without time-based flushing, and somewhere around 2500 for FlashCache.We can take a look at some vmstat data to see what&amp;#8217;s actually happening on the system during all these various tests. Clockwise from the top left in the next graph, we have &amp;#8220;no cache&amp;#8221;, &amp;#8220;FlashCache&amp;#8221;, &amp;#8220;vCache with no time-based flushing&amp;#8221;, and &amp;#8220;vCache with time-based flushing.&amp;#8221; As the images demonstrate, the no-cache system is being crushed by IO wait. FlashCache and vCache both show improvements, but it&amp;#8217;s not until we get to vCache with the time-based flushing that we see some nice, predictable, constant performance.So why is it the case that vCache with time-based flushing appears to outperform all the rest? My hypothesis here is that time-based flushing allows the backing store to be written to at a more constant and, potentially, submaximal, rate compared to dirty-page-threshold flushing, which kicks in at a given level and then attempts to flush as quickly as possible to bring the dirty pages back within acceptable bounds. This is, however, only a hypothesis.vCache vs. FlashCache &amp;#8211; dirty page thresholdFinally, we examine the impact of a couple of different dirty-page ratios on device performance, since this is the only parameter which can be reliably varied between the two in the same way. The following graph shows sysbench OLTP performance for FlashCache vs. vCache with a 10% dirty threshold versus the same metrics at a 50% dirty threshold. Time-based flushing has been disabled. In this case, both systems produce better performance when the dirty-page threshold is set to 50%, but once again, vCache at 10% outperforms FlashCache at 10%.The one interesting item here is that vCache actually appears to get *better* over time; I&amp;#8217;m not entirely sure why that&amp;#8217;s the case or at what point the performance is going to level off since these tests were all run for 2 hours anyway, but I think the overall results still speak for themselves, and even with a vCache volume where the dirty ratio is only 10%, such as might be the case where a deployment has a massive data set size in relation to both the working set and the cache device size, the numbers are encouraging.ConclusionOverall, the I think the graphs speak for themselves. When the working set outstrips the available buffer pool memory but still fits into the cache device, vCache shines. Compared to a deployment with no SSD cache whatsoever, FlashCache still does quite well, massively outperforming the HDD-only setup, but it doesn&amp;#8217;t even really come close to the numbers obtained with vCache. There may be ways to adjust the FlashCache configuration to produce better or more consistent results, or results that are more inline with the numbers put up by vCache, but when we consider that overall usability was one of the evaluation points and combine that with the fact that the best vCache performance results were obtained with the default vCache configuration, I think vCache can be declared the clear winner.Base MySQL &amp;amp; Benchmark ConfigurationAll benchmarks were conducted with the following:  sysbench ­­--num­-threads=32 ­­--test=tests/db/oltp.lua ­­--oltp_tables_count=32 \ --oltp­-table­-size=10000000 ­­--rand­-init=on ­­--report­-interval=1 ­­--rand­-type=pareto \ --forced­-shutdown=1 ­­--max­-time=7200 ­­--max­-requests=0 ­­--percentile=95 ­­\ --mysql­-user=root --mysql­-socket=/tmp/mysql.sock ­­--mysql­-table­-engine=innodb ­­\ --oltp­-read­-only=off run The base MySQL configuration (configuration A) appears below:  #####fixed innodb options innodb_file_format = barracuda innodb_buffer_pool_size = 4G innodb_file_per_table = true innodb_data_file_path = ibdata1:100M innodb_flush_method = O_DIRECT innodb_log_buffer_size = 128M innodb_flush_log_at_trx_commit = 1 innodb_log_file_size = 1G innodb_log_files_in_group = 2 innodb_purge_threads = 1 innodb_fast_shutdown = 1 #not innodb options (fixed) back_log = 50 wait_timeout = 120 max_connections = 5000 max_prepared_stmt_count=500000 max_connect_errors = 10 table_open_cache = 10240 max_allowed_packet = 16M binlog_cache_size = 16M max_heap_table_size = 64M sort_buffer_size = 4M join_buffer_size = 4M thread_cache_size = 1000 query_cache_size = 0 query_cache_type = 0 ft_min_word_len = 4 thread_stack = 192K tmp_table_size = 64M server­id = 101 key_buffer_size = 8M read_buffer_size = 1M read_rnd_buffer_size = 4M bulk_insert_buffer_size = 8M myisam_sort_buffer_size = 8M myisam_max_sort_file_size = 10G myisam_repair_threads = 1 myisam_recover The post Virident vCache vs. FlashCache: Part 2 appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<p>This is the second part in a two-part series comparing Virident&#8217;s vCache to FlashCache. The first part was focused on usability and feature comparison; in this post, we&#8217;ll look at some sysbench test results.</p><p>Disclosure: The research and testing conducted for this post were sponsored by Virident.</p><p>First, some background information. All tests were conducted on <a href="http://www.percona.com/docs/wiki/benchmark%3Ahardware%3Acisco_ucs_c250" target="_blank">Percona&#8217;s Cisco UCS C250</a> test machine, and both the vCache and FlashCache tests used the same 2.2TB Virident FlashMAX II as the cache storage device. EXT4 is the filesystem, and CentOS 6.4 the operating system, although the pre-release modules I received from Virident required the use of the CentOS 6.2 kernel, 2.6.32-220, so that was the kernel in use for all of the benchmarks on both systems. The benchmark tool used was sysbench 0.5 and the version of MySQL used was Percona Server 5.5.30-rel30.1-465. Each test was allowed to run for 7200 seconds, and the first 3600 seconds were discarded as warmup time; the remaining 3600 seconds were averaged into 10-second intervals. All tests were conducted with approximately 78GiB of data (32 tables, 10M rows each) and a 4GiB buffer pool. The cache devices were flushed to disk immediately prior to and immediately following each test run.</p><p>With that out of the way, let&#8217;s look at some numbers.</p><h3>vCache vs. vCache &#8211; MySQL parameter testing</h3><p>The first test was designed to look solely at vCache performance under some different sets of MySQL configuration parameters. For example, given that the front-end device is a very fast PCIe SSD, would it make more sense to configure MySQL as if it were using SSD storage or to just use an optimized HDD storage configuration? After creating a vCache device with the default configuration, I started with a baseline HDD configuration for MySQL (configuration A, listed at the bottom of this post) and then tried three additional sets of experiments. First, the baseline configuration plus:<br
/> <code><br
/> innodb_read_io_threads = 16<br
/> innodb_write_io_threads = 16<br
/> </code><br
/> We call this configuration B. The next one contained four SSD-specific optimizations based partially on some earlier work that I&#8217;d done with this Virident card (configuration C):<br
/> <code><br
/> innodb_io_capacity = 30000<br
/> innodb_adaptive_flushing_method = keep_average<br
/> innodb_flush_neighbor_pages=none<br
/> innodb_max_dirty_pages_pct = 60<br
/> </code><br
/> And then finally, a fourth test (configuration D) which combined the parameter changes from tests B and C. The graph below shows the sysbench throughput (tps) for these four configurations:<br
/> <a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_trx_params.png"><img class="alignnone size-full wp-image-15482" alt="vcache_trx_params" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_trx_params.png" width="640" height="480" /></a><br
/> As we can see, all of the configuration options produce numbers that, in the absence of outliers, are roughly identical, but it&#8217;s configuration C (shown in the graph as the blue line &#8211; SSD config) which shows the most consistent performance. The others all have assorted performance drops scattered throughout the graph. We see the exact same pattern when looking at transaction latency; the baseline numbers are roughly identical for all four configurations, but configuration C avoids the spikes and produces a very constant and predictable result.</p><p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_response_params.png"><img class="alignnone size-full wp-image-15483" alt="vcache_response_params" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_response_params.png" width="640" height="480" /></a></p><h3>vCache vs. FlashCache &#8211; the basics</h3><p>Once I&#8217;d determined that configuration C appeared to produce the most optimal results, I moved on to reviewing FlashCache performance versus that of vCache, and I also included a &#8220;no cache&#8221; test run as well using the base HDD MySQL configuration for purposes of comparison. Given the apparent differences in time-based flushing in vCache and FlashCache, both cache devices were set up so that time-based flushing was disabled. Also, both devices were set up such that all IO would be cached (i.e., no special treatment of sequential writes) and with a 50% dirty page threshold. Again, for comparison purposes, I also include the numbers from the vCache test where the time-based flushing is enabled.</p><p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_fcache_trx_params.png"><img class="alignnone size-full wp-image-15484" alt="vcache_fcache_trx_params" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_fcache_trx_params.png" width="640" height="480" /></a></p><p>As we&#8217;d expect, the HDD-only solution barely registered on the graph. With a buffer pool that&#8217;s much smaller than the working set, the no-cache approach is fairly crippled and ineffectual. FlashCache does substantially better, coming in at an average of around 600 tps, but vCache is about 3x better. The interesting item here is that vCache with time-based flushing enabled actually produces better and more consistent performance than vCache without time-based flushing, but even at its worst, the vCache test without time-based flushing still outperforms FlashCache by over 2x, on average.</p><p>Looking just at sysbench reads, vCache with time-based flushing consistently hit about 27000 per second, whereas without time-based flushing it averaged about 12500. FlashCache came in around 7500 or so. Sysbench writes came in just under 8000 for vCache + time-based flushing, around 6000 for vCache without time-based flushing, and somewhere around 2500 for FlashCache.</p><p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_fcache_read_write.png"><img class="alignnone  wp-image-15485" alt="vcache_fcache_read_write" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_fcache_read_write.png" width="720" height="270" /></a></p><p>We can take a look at some vmstat data to see what&#8217;s actually happening on the system during all these various tests. Clockwise from the top left in the next graph, we have &#8220;no cache&#8221;, &#8220;FlashCache&#8221;, &#8220;vCache with no time-based flushing&#8221;, and &#8220;vCache with time-based flushing.&#8221; As the images demonstrate, the no-cache system is being crushed by IO wait. FlashCache and vCache both show improvements, but it&#8217;s not until we get to vCache with the time-based flushing that we see some nice, predictable, constant performance.</p><p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/cpu-usage-all.png"><img class="alignnone  wp-image-15486" alt="cpu-usage-all" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/cpu-usage-all-1024x768.png" width="737" height="553" /></a></p><p>So why is it the case that vCache with time-based flushing appears to outperform all the rest? My hypothesis here is that time-based flushing allows the backing store to be written to at a more constant and, potentially, submaximal, rate compared to dirty-page-threshold flushing, which kicks in at a given level and then attempts to flush as quickly as possible to bring the dirty pages back within acceptable bounds. This is, however, only a hypothesis.</p><h3>vCache vs. FlashCache &#8211; dirty page threshold</h3><p>Finally, we examine the impact of a couple of different dirty-page ratios on device performance, since this is the only parameter which can be reliably varied between the two in the same way. The following graph shows sysbench OLTP performance for FlashCache vs. vCache with a 10% dirty threshold versus the same metrics at a 50% dirty threshold. Time-based flushing has been disabled. In this case, both systems produce better performance when the dirty-page threshold is set to 50%, but once again, vCache at 10% outperforms FlashCache at 10%.</p><p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache-dirty_trx_params.png"><img class="alignnone size-full wp-image-15487" alt="vcache-dirty_trx_params" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache-dirty_trx_params.png" width="640" height="480" /></a></p><p>The one interesting item here is that vCache actually appears to get *better* over time; I&#8217;m not entirely sure why that&#8217;s the case or at what point the performance is going to level off since these tests were all run for 2 hours anyway, but I think the overall results still speak for themselves, and even with a vCache volume where the dirty ratio is only 10%, such as might be the case where a deployment has a massive data set size in relation to both the working set and the cache device size, the numbers are encouraging.</p><h3>Conclusion</h3><p>Overall, the I think the graphs speak for themselves. When the working set outstrips the available buffer pool memory but still fits into the cache device, vCache shines. Compared to a deployment with no SSD cache whatsoever, FlashCache still does quite well, massively outperforming the HDD-only setup, but it doesn&#8217;t even really come close to the numbers obtained with vCache. There may be ways to adjust the FlashCache configuration to produce better or more consistent results, or results that are more inline with the numbers put up by vCache, but when we consider that overall usability was one of the evaluation points and combine that with the fact that the best vCache performance results were obtained with the default vCache configuration, I think vCache can be declared the clear winner.</p><h3>Base MySQL &amp; Benchmark Configuration</h3><p>All benchmarks were conducted with the following:<br
/> <code><br
/> sysbench ­­--num­-threads=32 ­­--test=tests/db/oltp.lua ­­--oltp_tables_count=32 \<br
/> --oltp­-table­-size=10000000 ­­--rand­-init=on ­­--report­-interval=1 ­­--rand­-type=pareto \<br
/> --forced­-shutdown=1 ­­--max­-time=7200 ­­--max­-requests=0 ­­--percentile=95 ­­\<br
/> --mysql­-user=root --mysql­-socket=/tmp/mysql.sock ­­--mysql­-table­-engine=innodb ­­\<br
/> --oltp­-read­-only=off run<br
/> </code></p><p>The base MySQL configuration (configuration A) appears below:<br
/> <code><br
/> #####fixed innodb options<br
/> innodb_file_format = barracuda<br
/> innodb_buffer_pool_size = 4G<br
/> innodb_file_per_table = true<br
/> innodb_data_file_path = ibdata1:100M<br
/> innodb_flush_method = O_DIRECT<br
/> innodb_log_buffer_size = 128M<br
/> innodb_flush_log_at_trx_commit = 1<br
/> innodb_log_file_size = 1G<br
/> innodb_log_files_in_group = 2<br
/> innodb_purge_threads = 1<br
/> innodb_fast_shutdown = 1<br
/> #not innodb options (fixed)<br
/> back_log = 50<br
/> wait_timeout = 120<br
/> max_connections = 5000<br
/> max_prepared_stmt_count=500000<br
/> max_connect_errors = 10<br
/> table_open_cache = 10240<br
/> max_allowed_packet = 16M<br
/> binlog_cache_size = 16M<br
/> max_heap_table_size = 64M<br
/> sort_buffer_size = 4M<br
/> join_buffer_size = 4M<br
/> thread_cache_size = 1000<br
/> query_cache_size = 0<br
/> query_cache_type = 0<br
/> ft_min_word_len = 4<br
/> thread_stack = 192K<br
/> tmp_table_size = 64M<br
/> server­id = 101<br
/> key_buffer_size = 8M<br
/> read_buffer_size = 1M<br
/> read_rnd_buffer_size = 4M<br
/> bulk_insert_buffer_size = 8M<br
/> myisam_sort_buffer_size = 8M<br
/> myisam_max_sort_file_size = 10G<br
/> myisam_repair_threads = 1<br
/> myisam_recover<br
/> </code></p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/17/virident-vcache-vs-flashcache-part-2/">Virident vCache vs. FlashCache: Part 2</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=69418&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=69418&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 17 May 2013 10:00:56 +0000</pubDate>
    <dc:creator>MySQL Performance Blog</dc:creator>
    <category>Benchmarks</category>
    <category>Hardware and Storage</category>
    <category>MySQL</category>
    <category>Ernie Souhrada</category>
    <category>FlashCache</category>
    <category>MLC</category>
    <category>PCIe</category>
    <category>sysbench</category>
    <category>vCache</category>
    <category>Virident</category>
  </item>

  <item>
    <title>MyQuery 3.5.1 beta released!</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-9144505959002328789.post-4449469162256345380</guid>
    <link>http://karlssonondatabases.blogspot.com/2013/05/myquery-351-beta-released.html</link>
    <description>After a lot of fuzz, I am now releasing MyQuery version 3.5.1. This version introduces one big feature, a brand new Dictionary viewer. In addition to that, there are numerous bug fixes and the removal of one feature, which is the option to run with just 1 connection: In this version, 2 connections will always be used, and I have some good reasons to remove this as being optional, fact is, running with 1 connection was hard to diagnose, caused a lot of problems, and had no real benefit actually, just drawbacks.So, for you Windows users, MyQuery 3.5.1 is now out there, but it is really a beta. The beta is caused by the new Dictionary viewer, the rest should be pretty stable.Download it from sourceforge.Happy SQLing/Karlsson</description>
    <content:encoded><![CDATA[After a lot of fuzz, I am now releasing MyQuery version 3.5.1. This version introduces one big feature, a brand new Dictionary viewer. In addition to that, there are numerous bug fixes and the removal of one feature, which is the option to run with just 1 connection: In this version, 2 connections will always be used, and I have some good reasons to remove this as being optional, fact is, running with 1 connection was hard to diagnose, caused a lot of problems, and had no real benefit actually, just drawbacks.<br /><br />So, for you Windows users, MyQuery 3.5.1 is now out there, but it is really a beta. The beta is caused by the new Dictionary viewer, the rest should be pretty stable.<br /><br />Download it from <a href="http://sourceforge.net/projects/myquery/" target="_blank">sourceforge</a>.<br /><br />Happy SQLing<br />/Karlsson<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68297&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68297&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 16 May 2013 22:38:00 +0000</pubDate>
    <dc:creator>Anders Karlsson</dc:creator>
    <category>mysql windows query</category>
  </item>

  <item>
    <title>Reestablishing a MySQL Tradition</title>
    <guid isPermaLink="false">http://opensourcedba.wordpress.com/?p=1338</guid>
    <link>http://opensourcedba.wordpress.com/2013/05/16/reestablishing-a-mysql-tradition/</link>
    <description>Every so often you see something from the past and wonder &amp;#8220;Why don&amp;#8217;t we do that anymore?&amp;#8221;  Well, in this case it was a former co-worker wearing his MySQL Contributor shirt. This is Antony Curtis in one of the original MySQL Community Contributor shirt So the MySQL Community Team had a quick meeting and the result is that we are reestablishing the tradition.  So if you have a signed Oracle Contributor Agreement and have contributed to MySQL, you should have in your inbox a request for your shirt size and a shipping address.  If you do not see an email and you qualify for a short, let us know (we probably have an old email on record for you).   And if you are working on some code for MySQL and have that OCA ready but not filed, please expedite your actions so you do not miss out on this batch.
   </description>
    <content:encoded><![CDATA[<p>Every so often you see something from the past and wonder &#8220;Why don&#8217;t we do that anymore?&#8221;  Well, in this case it was a former co-worker wearing his MySQL Contributor shirt. <div><a href="http://opensourcedba.files.wordpress.com/2013/05/contribshirt.jpg"><img src="http://opensourcedba.files.wordpress.com/2013/05/contribshirt.jpg?w=222&amp;h=300" alt="This is Antony Curtis in the original Community Contributor shit" width="222" height="300" class="size-medium wp-image-1339" /></a><p>This is Antony Curtis in one of the original MySQL Community Contributor shirt</p></div> So the MySQL Community Team had a quick meeting and the result is that we are reestablishing the tradition.  So if you have a signed Oracle Contributor Agreement and have contributed to MySQL, you should have in your inbox a request for your shirt size and a shipping address.  If you do not see an email and you qualify for a short, let us know (we probably have an old email on record for you).   And if you are working on some code for MySQL and have that OCA ready but not filed, please expedite your actions so you do not miss out on this batch.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/opensourcedba.wordpress.com/1338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/opensourcedba.wordpress.com/1338/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=opensourcedba.wordpress.com&amp;blog=15386988&amp;post=1338&amp;subd=opensourcedba&amp;ref=&amp;feed=1" width="1" height="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68296&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68296&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 16 May 2013 16:45:06 +0000</pubDate>
    <dc:creator>Dave Stokes</dc:creator>
    <category>community team</category>
  </item>

  <item>
    <title>Understanding Tokutek Fractal Tree Indexes</title>
    <guid isPermaLink="false">http://effectiveMySQL.com/?p=916</guid>
    <link>http://effectivemysql.com/article/understanding-tokutek-fractal-tree-indexes/</link>
    <description>

Download PDF Presentation

Thanks to Tim Callaghan for speaking Tuesday night at the Effective MySQL New York meetup on  Fractal Tree Indexes : Theory and Practice (MySQL and MongoDB).  There was a good turnout and a full room to learn how the TokuDB storage engine from Tokutek is changing how to handle big data in MySQL.  
Also interesting is how the same technology has been applied for use in MongoDB including giving MongoDB transactions; a big change for NoSQL. 
Related News:  Tokutek Meets Big Data Demand With Open Source TokuDB</description>
    <content:encoded><![CDATA[<div>
<a href="http://effectivemysql.com/downloads/20130514-nyc-effective-mysql-toku-mysql-mongo.pdf" alt="download link"><img src="http://effectivemysql.com/images/type-pdf.gif" alt="download pdf" /></a><br />
<a href="http://effectivemysql.com/downloads/20130514-nyc-effective-mysql-toku-mysql-mongo.pdf" alt="download link">Download PDF Presentation</a>
</div>
<p>Thanks to Tim Callaghan for speaking Tuesday night at the Effective MySQL New York meetup on  <a href="http://www.meetup.com/EffectiveMySQL/events/108932962/">Fractal Tree Indexes : Theory and Practice (MySQL and MongoDB)</a>.  There was a good turnout and a full room to learn how the TokuDB storage engine from <a href="http://tokutek.com">Tokutek</a> is changing how to handle big data in MySQL.  </p>
<p>Also interesting is how the same technology has been applied for use in MongoDB including giving MongoDB transactions; a big change for NoSQL. </p>
<p>Related News:  <a href="http://online.wsj.com/article/PR-CO-20130422-907104.html">Tokutek Meets Big Data Demand With Open Source TokuDB</a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68192&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68192&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 16 May 2013 14:40:45 +0000</pubDate>
    <dc:creator>Effective MySQL</dc:creator>
    <category>Article</category>
    <category>Indexes</category>
    <category>Storage Engines</category>
    <category>compression</category>
    <category>performance</category>
    <category>storage engine</category>
    <category>tokutek</category>
  </item>

  <item>
    <title>Spreading the word about the Performance Schema</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-1559905463192401345.post-2083590236540065886</guid>
    <link>http://marcalff.blogspot.com/2013/05/spreading-word-about-performance-schema.html</link>
    <description>In case you missed it, more and more people are now spreading the word about the Performance Schema, which is a very good thing.

#DBHangOps 4/10/13 

Mark Leith presents the Performance Schema and ps_helpers.

Random quotes from the recording:
&quot;I am already seeing so many benefits out of this, ...&quot;
&quot;This looks fantastic&quot;
&quot;Very cool&quot;

OurSQL Episode 139: Starting to Perform

Sheeri and Gerry present the Performance Schema.

Ramdom quote from the recording:
&quot;I am looking at this feature [digests], and I think it's amazing&quot;

Webinar: MySQL 5.6 Performance Schema

PeterZ presents the Performance Schema, and ps_helpers, followed by a Q &amp;amp; A session with myself as a special quest.

Watch for updates with the recording, I don't want to add quotes just from memory (there are good ones too).

Marc Alff,
Performance Schema Architect, 
Oracle.
</description>
    <content:encoded><![CDATA[In case you missed it, more and more people are now spreading the word about the Performance Schema, which is a very good thing.<br />
<br />
<b>#DBHangOps 4/10/13 </b><br />
<br />
Mark Leith <a href="http://www.geoffreyanderson.net/blog/2013/04/08/dbhangops-41013-pre-percona-conference/">presents</a> the Performance Schema and ps_helpers.<br />
<br />
Random quotes from the recording:<br />
"I am already seeing so many benefits out of this, ..."<br />
"This looks fantastic"<br />
"Very cool"<br />
<br />
<b>OurSQL Episode 139: Starting to Perform</b><br />
<br />
Sheeri and Gerry <a href="http://technocation.org/content/oursql-episode-139%3A-starting-perform">present</a> the Performance Schema.<br />
<br />
Ramdom quote from the recording:<br />
"I am looking at this feature [digests], and I think it's amazing"<br />
<br />
<b>Webinar: MySQL 5.6 Performance Schema</b><br />
<br />
PeterZ <a href="http://www.mysqlperformanceblog.com/2013/05/13/webinar-mysql-5-6-performance-schema/">presents</a> the Performance Schema, and ps_helpers, followed by a Q &amp; A session with myself as a special quest.<br />
<br />
Watch for updates with the recording, I don't want to add quotes just from memory (there are good ones too).<br />
<br />
Marc Alff,<br />
Performance Schema Architect, <br />
Oracle.<br />
<br /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=67273&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=67273&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 16 May 2013 10:02:27 +0000</pubDate>
    <dc:creator>Marc Alff</dc:creator>
    <category>MySQL</category>
    <category>PERFORMANCE_SCHEMA</category>
  </item>

  <item>
    <title>Virident vCache vs. FlashCache: Part 1</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15074</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/16/virident-vcache-vs-flashcache-part-1/</link>
    <description>(This is part one of a two part series) Over the past few weeks I have been looking at a preview release of Virident&amp;#8217;s vCache software, which is a kernel module and set of utilities designed to provide functionality similar to that of FlashCache. In particular, Virident engaged Percona to do a usability and feature-set comparison between vCache and FlashCache and also to conduct some benchmarks for the use case where the MySQL working set is significantly larger than the InnoDB buffer pool (thus leading to a lot of buffer pool disk reads) but still small enough to fit into the cache device. In this post and the next, I&amp;#8217;ll present some of those results.Disclosure: The research and testing for this post series was sponsored by Virident.Usability is, to some extent, a subjective call, as I may have preferences for or against a certain mode of operation that others may not share, so readers may have a different opinion than mine, but on this point I call it an overall draw between vCache and FlashCache.Ease of basic installation. The setup process was simply a matter of installing two RPMs and running a couple of commands to enable vCache on the PCIe flash card (a Virident FlashMAX II) and set up the cache device with the command-line utilities supplied with one of the RPMs. Moreover, the vCache software is built in to the Virident driver, so there is no additional module to install. FlashCache, on the other hand, requires building a separate kernel module in addition to whatever flash memory driver you&amp;#8217;ve already had to install, and then further configuration requires modification to assorted sysctls. I would also argue that the vCache documentation is superior. Winner: vCache.Ease of post-setup modification / advanced installation. Many of the FlashCache device parameters can be easily modified by echoing the desired value to the appropriate sysctl setting; with vCache, there is a command-line binary which can modify many of the same parameters, but doing so requires a cache flush, detach, and reattach. Winner: FlashCache.Operational Flexibility: Both solutions share many features here; both of them allow whitelisting and blacklisting of PIDs or simply running in a &amp;#8220;cache everything&amp;#8221; mode. Both of them have support for not caching sequential IO, adjusting the dirty page threshold, flushing the cache on demand, or having a time-based cache flushing mechanism, but some of these features operate differently with vCache than with FlashCache. For example, when doing a manual cache flush with vCache, this is a blocking operation. With FlashCache, echoing &amp;#8220;1&amp;#8243; to the do_sync sysctl of the cache device triggers a cache flush, but it happens in the background, and while countdown messages are written to syslog as the operation proceeds, the device never reports that it&amp;#8217;s actually finished. I think both kinds of flushing are useful in different situations, and I&amp;#8217;d like to see a non-blocking background flush in vCache, but if I had to choose one or the other, I&amp;#8217;ll take blocking and modal over fire-and-forget any day. FlashCache does have the nice ability to switch between FIFO and LRU for its flushing algorithm; vCache does not. This is something that could prove useful in certain situations. Winner: FlashCache.Operational Monitoring: Both solutions offer plenty of statistics; the main difference is that FlashCache stats can be pulled from /proc but vCache stats have to be retrieved by running the vgc-vcache-monitor command. Personally, I prefer &amp;#8220;cat /proc/something&amp;#8221; but I&amp;#8217;m not sure that&amp;#8217;s sufficient to award this category to FlashCache. Winner: None.Time-based Flushing: This wouldn&amp;#8217;t seem like it should be a separate category, but because the behavior seems to be so different between the two cache solutions, I&amp;#8217;m listing it here. The vCache manual indicates that “flush period” specifies the time after which dirty blocks will be written to the backing store, whereas FlashCache has a setting called “fallow_delay”, defined in the documentation as the time period before “idle” dirty blocks are cleaned from the cache device. It is not entirely clear whether or not these mechanisms operate in the same fashion, but based on the documentation, it appears that they do not. I find the vCache implementation more useful than the one present in FlashCache. Winner: vCache.Although nobody likes a tie, if you add up the scores, usability is a 2-2-1 draw between vCache and FlashCache. There are things that I really liked better with FlashCache, and there are other things that I thought vCache did a much better job with. If I absolutely must pick a winner in terms of usability, then I&amp;#8217;d give a slight edge to FlashCache due to configuration flexibility, but if the GA release of vCache added some of FlashCache&amp;#8217;s additional configuration options and exposed statistics via /proc, I&amp;#8217;d vote in the other direction.Stay tuned for part two of this series, wherein we&amp;#8217;ll take a look at some benchmarks. There&amp;#8217;s no razor-thin margin of victory for either side here: vCache outperforms FlashCache by a landslide.The post Virident vCache vs. FlashCache: Part 1 appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<p><em><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/boxinggloves.jpg"><img class="alignleft size-medium wp-image-15480" alt="Virident vCache vs. FlashCache" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/boxinggloves-300x199.jpg" width="300" height="199" /></a>(This is part one of a two part series)</em> Over the past few weeks I have been looking at a preview release of Virident&#8217;s vCache software, which is a kernel module and set of utilities designed to provide functionality similar to that of FlashCache. In particular, Virident engaged Percona to do a usability and feature-set comparison between vCache and FlashCache and also to conduct some benchmarks for the use case where the MySQL working set is significantly larger than the InnoDB buffer pool (thus leading to a lot of buffer pool disk reads) but still small enough to fit into the cache device. In this post and the next, I&#8217;ll present some of those results.</p><p>Disclosure: The research and testing for this post series was sponsored by Virident.</p><p>Usability is, to some extent, a subjective call, as I may have preferences for or against a certain mode of operation that others may not share, so readers may have a different opinion than mine, but on this point I call it an overall draw between vCache and FlashCache.</p><p>Ease of basic installation. The setup process was simply a matter of installing two RPMs and running a couple of commands to enable vCache on the PCIe flash card (a Virident FlashMAX II) and set up the cache device with the command-line utilities supplied with one of the RPMs. Moreover, the vCache software is built in to the Virident driver, so there is no additional module to install. FlashCache, on the other hand, requires building a separate kernel module in addition to whatever flash memory driver you&#8217;ve already had to install, and then further configuration requires modification to assorted sysctls. I would also argue that the vCache documentation is superior. <strong>Winner: vCache.</strong></p><p>Ease of post-setup modification / advanced installation. Many of the FlashCache device parameters can be easily modified by echoing the desired value to the appropriate sysctl setting; with vCache, there is a command-line binary which can modify many of the same parameters, but doing so requires a cache flush, detach, and reattach. <strong>Winner: FlashCache.</strong></p><p>Operational Flexibility: Both solutions share many features here; both of them allow whitelisting and blacklisting of PIDs or simply running in a &#8220;cache everything&#8221; mode. Both of them have support for not caching sequential IO, adjusting the dirty page threshold, flushing the cache on demand, or having a time-based cache flushing mechanism, but some of these features operate differently with vCache than with FlashCache. For example, when doing a manual cache flush with vCache, this is a blocking operation. With FlashCache, echoing &#8220;1&#8243; to the do_sync sysctl of the cache device triggers a cache flush, but it happens in the background, and while countdown messages are written to syslog as the operation proceeds, the device never reports that it&#8217;s actually finished. I think both kinds of flushing are useful in different situations, and I&#8217;d like to see a non-blocking background flush in vCache, but if I had to choose one or the other, I&#8217;ll take blocking and modal over fire-and-forget any day. FlashCache does have the nice ability to switch between FIFO and LRU for its flushing algorithm; vCache does not. This is something that could prove useful in certain situations. <strong>Winner: FlashCache.</strong></p><p>Operational Monitoring: Both solutions offer plenty of statistics; the main difference is that FlashCache stats can be pulled from /proc but vCache stats have to be retrieved by running the vgc-vcache-monitor command. Personally, I prefer &#8220;cat /proc/something&#8221; but I&#8217;m not sure that&#8217;s sufficient to award this category to FlashCache. <strong>Winner: None.</strong></p><p>Time-based Flushing: This wouldn&#8217;t seem like it should be a separate category, but because the behavior seems to be so different between the two cache solutions, I&#8217;m listing it here. The vCache manual indicates that “flush period” specifies the time after which dirty blocks will be written to the backing store, whereas FlashCache has a setting called “fallow_delay”, defined in the documentation as the time period before “idle” dirty blocks are cleaned from the cache device. It is not entirely clear whether or not these mechanisms operate in the same fashion, but based on the documentation, it appears that they do not. I find the vCache implementation more useful than the one present in FlashCache. <strong>Winner: vCache.</strong></p><p>Although nobody likes a tie, if you add up the scores, usability is a 2-2-1 draw between vCache and FlashCache. There are things that I really liked better with FlashCache, and there are other things that I thought vCache did a much better job with. If I absolutely must pick a winner in terms of usability, then I&#8217;d give a slight edge to FlashCache due to configuration flexibility, but if the GA release of vCache added some of FlashCache&#8217;s additional configuration options and exposed statistics via /proc, I&#8217;d vote in the other direction.</p><p>Stay tuned for part two of this series, wherein we&#8217;ll take a look at some benchmarks. There&#8217;s no razor-thin margin of victory for either side here: vCache outperforms FlashCache by a landslide.</p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/16/virident-vcache-vs-flashcache-part-1/">Virident vCache vs. FlashCache: Part 1</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=67170&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=67170&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 16 May 2013 10:00:02 +0000</pubDate>
    <dc:creator>MySQL Performance Blog</dc:creator>
    <category>Benchmarks</category>
    <category>Hardware and Storage</category>
    <category>MySQL</category>
    <category>Ernie Souhrada</category>
    <category>FlashCache</category>
    <category>PCIe</category>
    <category>SSD</category>
    <category>vCache</category>
    <category>Virident</category>
  </item>

  <item>
    <title>RethinkDB 1.5: secondary indexes, batched inserts performance improvements, soft durability mode</title>
    <guid isPermaLink="false">http://rethinkdb.com/blog/1.5-release</guid>
    <link>http://rethinkdb.com/blog/1.5-release</link>
    <description>We are pleased to announce RethinkDB 1.5 (The Graduate), so go
download it now!

This release includes the long-awaited support for secondary indexes,
a new algorithm for batched inserts that results in an ~18x performance
improvement, support for soft durability (don&amp;#39;t worry -- off by
default), and over 180
bug fixes, features, and enhancements.


    
        Upgrading to 1.5? Make sure to migrate
        your data before upgrading to RethinkDB 1.5. &amp;rarr;
    


Secondary indexes


    


Support for secondary indexes has been the most requested feature
since we launched RethinkDB, and has been in development for over
six months. It
required a massive amount of server work and involved modifying almost
every part of the codebase: the BTree code, the concurrency
subsystem, the distribution layer, the query language, the
client drivers, and even the web UI.

We worked hard to make sure secondary
indexes are extremely easy to use. Here&amp;#39;s how you&amp;#39;d create a secondary index on the last_name attribute:
r.table(&amp;#39;users&amp;#39;).indexCreate(&amp;#39;last_name&amp;#39;)



Then getting all users with the last name Smith would be:
r.table(&amp;#39;users&amp;#39;).getAll(&amp;#39;Smith&amp;#39;, { index: &amp;#39;last_name&amp;#39; })



Or you could retrieve arbitrary ranges of the index. For example, all users whose last names are between Smith and Wade:
r.table(&amp;#39;users&amp;#39;).between(&amp;#39;Smith&amp;#39;, &amp;#39;Wade&amp;#39;, { index: &amp;#39;last_name&amp;#39; })



Listing and dropping indexes is also a part of the API:
r.table(&amp;#39;users&amp;#39;).indexList()             // list indexes on table &amp;#39;users&amp;#39;
r.table(&amp;#39;users&amp;#39;).indexDrop(&amp;#39;last_name&amp;#39;)  // drop index &amp;#39;last_name&amp;#39; on table &amp;#39;users&amp;#39;



In addition to manipulating secondary indexes via ReQL, you can perform these from the admin UI:



You can define compound indexes, and even indexes based on arbitrary ReQL expressions. Secondary indexes can be used
to do efficient table joins, and are sharded and replicated along with
the rest of the database. Learn more about how to use secondary
indexes in the FAQ.

Batched inserts performance improvements

Since the initial release, RethinkDB has supported inserting batches
of documents. Instead of inserting multiple documents one at a time:
r.table(&amp;#39;users&amp;#39;).insert({ name: &amp;#39;Michael&amp;#39; })
r.table(&amp;#39;users&amp;#39;).insert({ name: &amp;#39;Bill&amp;#39; })



it was always possible to insert a batch of documents in one command with a single network roundtrip:
r.table(&amp;#39;users&amp;#39;).insert([{ name: &amp;#39;Michael&amp;#39; },
                         { name: &amp;#39;Bill&amp;#39; }])



However, the server had always executed batched inserts by translating
them to a series of single insert commands. While sending the data in
a single network roundtrip reduced the network latency, it still had
very poor performance because the server would have to flush each
document to disk before moving on to the next document.

The 1.5 release includes a new insert algorithm
that flushes changes to disk in batches while maintaining the guarantee of 
consistency in case of power failure. This algorithm drastically
improves performance of batched inserts. While not something we&amp;#39;d call a benchmark, inserting 100 medium-sized
documents went from 2.8 seconds to 160 milliseconds on a development
system, and the ~18x performance improvement is consistently
reproducible on different batched insert workloads and types of
hardware.

Soft durability mode

Early in the development of RethinkDB, we made the design decision to
be extremely conservative about durability and safety of users&amp;#39;s
data. In this respect RethinkDB is like any other traditional database
system -- the server does not acknowledge the write until it&amp;#39;s safely
committed to disk. While this is a sensible default for a database
system, many of our users pointed out that they&amp;#39;re using RethinkDB for
storing access logs or clickstream data, or as a persistent, replicated
cache of JSON documents. These scenarios might require trading off some durability guarantees for higher performance.

The 1.5 release includes support for relaxed durability (off by default, of
course). For tables in this mode, the server acknowledges writes as soon as it
receives them, and flushes data to disk in the background. Flushes normally
occur every few seconds, or if there are too many dirty blocks cached in
memory.

Hard durability can be turned off when creating a table via the
advanced settings in the web UI or in ReQL:
db.tableCreate(&amp;#39;http_logs&amp;#39;, { hard_durability: false })



You&amp;#39;ll notice that write performance on tables with hard
durability turned off is about ~30x faster than normal tables. Note that
the data still gets flushed to disk in the background and is
consistent in case of failures. For those familiar with MySQL&amp;#39;s InnoDB
engine, RethinkDB&amp;#39;s soft durability is similar to setting InnoDB&amp;#39;s
innodb_flush_log_at_trx_commit to 0 (more info on this setting in InnoDB).

You can change the durability mode for an existing table via the admin CLI:
$ rethinkdb admin -j localhost:29015
localhost:29015&amp;gt; set durability http_logs --hard



Many more enhancements

The 1.5 release includes many more enhancements -- check out the
changelog for a complete list. Here are a few more
notable changes:


For super-fast insert performance, RethinkDB now supports
noreply writes that allow writing data over the
network without waiting for a server acknowledgment. This mode
allows for an apples-to-apples benchmark comparison with MongoDB.
The Data Explorer in the web UI now supports
electric punctuation,
as well as a toggle to turn it off. This can make typing queries in
the data explorer much more pleasant.
The web UI will now check if there is a new version of RethinkDB
and inform you if you need to upgrade (the check is done as a simple AJAX
request from the browser, and can be turned off).


Looking forward to 1.6

We are already hard at work on the
1.6 release. This
release should be quick and easy, and will include
many
ReQL
enhancements. We will also focus on continuously improving performance with each version. However, the next
release isn&amp;#39;t set in stone. If a feature is important to you,
let us know.</description>
    <content:encoded><![CDATA[<p>We are pleased to announce <strong>RethinkDB 1.5</strong> (<a href="http://www.youtube.com/watch?v=yRBNA27N0ts">The Graduate</a>), so go
<a href="http://rethinkdb.com/docs/install/">download it now</a>!</p>

<p>This release includes the long-awaited support for secondary indexes,
a new algorithm for batched inserts that results in an ~18x performance
improvement, support for soft durability (don&#39;t worry -- off by
default), and <a href="https://github.com/rethinkdb/rethinkdb/issues?milestone=8&amp;page=1&amp;state=closed">over 180</a>
bug fixes, features, and enhancements.</p>

<div>
    <p>
        <strong>Upgrading to 1.5?</strong> Make sure to <strong><a href="https://github.com/rethinkdb/rethinkdb/tree/next/scripts/migration">migrate
        your data</a></strong> before upgrading to RethinkDB 1.5. &rarr;
    </p>
</div>

<h2>Secondary indexes</h2>

<div>
    <a href="https://twitter.com/karl_grz/statuses/322420083093819392"><img src="http://rethinkdb.com/assets/images/posts/2013-05-16-1.5-release-1.png" /></a>
</div>

<p>Support for secondary indexes has been the most requested feature
since we launched RethinkDB, and has been in development for over
<a href="https://github.com/rethinkdb/rethinkdb/issues/88">six months</a>. It
required a massive amount of server work and involved modifying almost
every part of the codebase: the BTree code, the concurrency
subsystem, the distribution layer, the query language, the
client drivers, and even the web UI.</p>

<p>We worked hard to make sure secondary
indexes are extremely easy to use. Here&#39;s how you&#39;d create a secondary index on the <code>last_name</code> attribute:</p>
<div><pre><code><span>r</span><span>.</span><span>table</span><span>(</span><span>&#39;users&#39;</span><span>).</span><span>indexCreate</span><span>(</span><span>&#39;last_name&#39;</span><span>)</span>
</code></pre>
</div>

<p>Then getting all users with the last name Smith would be:</p>
<div><pre><code><span>r</span><span>.</span><span>table</span><span>(</span><span>&#39;users&#39;</span><span>).</span><span>getAll</span><span>(</span><span>&#39;Smith&#39;</span><span>,</span> <span>{</span> <span>index</span><span>:</span> <span>&#39;last_name&#39;</span> <span>})</span>
</code></pre>
</div>

<p>Or you could retrieve arbitrary ranges of the index. For example, all users whose last names are between Smith and Wade:</p>
<div><pre><code><span>r</span><span>.</span><span>table</span><span>(</span><span>&#39;users&#39;</span><span>).</span><span>between</span><span>(</span><span>&#39;Smith&#39;</span><span>,</span> <span>&#39;Wade&#39;</span><span>,</span> <span>{</span> <span>index</span><span>:</span> <span>&#39;last_name&#39;</span> <span>})</span>
</code></pre>
</div>

<p>Listing and dropping indexes is also <a href="http://rethinkdb.com/api/#js:manipulating_tables-index_list">a part of the API</a>:</p>
<div><pre><code><span>r</span><span>.</span><span>table</span><span>(</span><span>&#39;users&#39;</span><span>).</span><span>indexList</span><span>()</span>             <span>// list indexes on table &#39;users&#39;</span>
<span>r</span><span>.</span><span>table</span><span>(</span><span>&#39;users&#39;</span><span>).</span><span>indexDrop</span><span>(</span><span>&#39;last_name&#39;</span><span>)</span>  <span>// drop index &#39;last_name&#39; on table &#39;users&#39;</span>
</code></pre>
</div>

<p>In addition to manipulating secondary indexes via ReQL, you can perform these from the admin UI:</p>

<div><a href="http://rethinkdb.com/videos/secondary-indexes-in-1-5"></a></div>

<p>You can define compound indexes, and even indexes based on arbitrary ReQL expressions. Secondary indexes can be used
to do efficient table joins, and are sharded and replicated along with
the rest of the database. Learn more about <a href="http://rethinkdb.com/docs/pragmatic-faq/#how-do-i-take-advantage-of-secondary-indexes">how to use secondary
indexes</a> in the FAQ.</p>

<h2>Batched inserts performance improvements</h2>

<p>Since the initial release, RethinkDB has supported inserting batches
of documents. Instead of inserting multiple documents one at a time:</p>
<div><pre><code><span>r</span><span>.</span><span>table</span><span>(</span><span>&#39;users&#39;</span><span>).</span><span>insert</span><span>({</span> <span>name</span><span>:</span> <span>&#39;Michael&#39;</span> <span>})</span>
<span>r</span><span>.</span><span>table</span><span>(</span><span>&#39;users&#39;</span><span>).</span><span>insert</span><span>({</span> <span>name</span><span>:</span> <span>&#39;Bill&#39;</span> <span>})</span>
</code></pre>
</div>

<p>it was always possible to insert a batch of documents in one command with a single network roundtrip:</p>
<div><pre><code><span>r</span><span>.</span><span>table</span><span>(</span><span>&#39;users&#39;</span><span>).</span><span>insert</span><span>([{</span> <span>name</span><span>:</span> <span>&#39;Michael&#39;</span> <span>},</span>
                         <span>{</span> <span>name</span><span>:</span> <span>&#39;Bill&#39;</span> <span>}])</span>
</code></pre>
</div>

<p>However, the server had always executed batched inserts by translating
them to a series of single insert commands. While sending the data in
a single network roundtrip reduced the network latency, it still had
very poor performance because the server would have to flush each
document to disk before moving on to the next document.</p>

<p>The 1.5 release includes a <a href="https://github.com/rethinkdb/rethinkdb/issues/457">new insert algorithm</a>
that flushes changes to disk in batches while maintaining the guarantee of 
consistency in case of power failure. This algorithm drastically
improves performance of batched inserts. While not something we&#39;d call a benchmark, inserting 100 medium-sized
documents went from 2.8 seconds to 160 milliseconds on a development
system, and the ~18x performance improvement is consistently
reproducible on different batched insert workloads and types of
hardware.</p>

<h2>Soft durability mode</h2>

<p>Early in the development of RethinkDB, we made the design decision to
be extremely conservative about durability and safety of users&#39;s
data. In this respect RethinkDB is like any other traditional database
system -- the server does not acknowledge the write until it&#39;s safely
committed to disk. While this is a sensible default for a database
system, many of our users pointed out that they&#39;re using RethinkDB for
storing access logs or clickstream data, or as a persistent, replicated
cache of JSON documents. These scenarios might require trading off some durability guarantees for higher performance.</p>

<p>The 1.5 release includes support for relaxed durability (off by default, of
course). For tables in this mode, the server acknowledges writes as soon as it
receives them, and flushes data to disk in the background. Flushes normally
occur every few seconds, or if there are too many dirty blocks cached in
memory.</p>

<p>Hard durability can be turned off when creating a table via the
advanced settings in the web UI or in ReQL:</p>
<div><pre><code><span>db</span><span>.</span><span>tableCreate</span><span>(</span><span>&#39;http_logs&#39;</span><span>,</span> <span>{</span> <span>hard_durability</span><span>:</span> <span>false</span> <span>})</span>
</code></pre>
</div>

<p>You&#39;ll notice that write performance on tables with hard
durability turned off is about ~30x faster than normal tables. Note that
the data still gets flushed to disk in the background and is
consistent in case of failures. For those familiar with MySQL&#39;s InnoDB
engine, RethinkDB&#39;s soft durability is similar to setting InnoDB&#39;s
<code>innodb_flush_log_at_trx_commit</code> to <code>0</code> (<a href="http://dev.mysql.com/doc/refman/4.1/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit">more info on this setting in InnoDB</a>).</p>

<p>You can change the durability mode for an existing table via the admin CLI:</p>
<div><pre><code>$ rethinkdb admin -j localhost:29015
localhost:29015&gt; set durability http_logs --hard
</code></pre>
</div>

<h2>Many more enhancements</h2>

<p>The 1.5 release includes many more enhancements -- check out the
<a href="https://github.com/rethinkdb/rethinkdb/blob/v1.5.0/NOTES">changelog</a> for a complete list. Here are a few more
notable changes:</p>

<ul>
<li>For super-fast insert performance, RethinkDB now supports
<a href="http://rethinkdb.com/api/#js:accessing_rql-run">noreply writes</a> that allow writing data over the
network without waiting for a server acknowledgment. This mode
allows for an apples-to-apples benchmark comparison with MongoDB.</li>
<li>The Data Explorer in the web UI now supports
<a href="https://github.com/rethinkdb/rethinkdb/issues/569">electric punctuation</a>,
as well as a toggle to turn it off. This can make typing queries in
the data explorer much more pleasant.</li>
<li>The web UI will now check if there is a new version of RethinkDB
and inform you if you need to upgrade (the check is done as a simple AJAX
request from the browser, and can be turned off).</li>
</ul>

<h2>Looking forward to 1.6</h2>

<p>We are already hard at work on the
<a href="https://github.com/rethinkdb/rethinkdb/issues?milestone=31&amp;state=open">1.6 release</a>. This
release should be quick and easy, and will include
<a href="https://github.com/rethinkdb/rethinkdb/issues/570">many</a>
<a href="https://github.com/rethinkdb/rethinkdb/issues/341">ReQL</a>
<a href="https://github.com/rethinkdb/rethinkdb/issues/186">enhancements</a>. We will also focus on continuously improving performance with each version. However, the next
release isn&#39;t set in stone. If a feature is important to you,
<a href="http://rethinkdb.com/community/">let us know</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68295&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68295&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 16 May 2013 07:00:00 +0000</pubDate>
    <dc:creator>Slava Akhmechet</dc:creator>
  </item>

  <item>
    <title>Index-only queries for Prefix indexes</title>
    <guid isPermaLink="false">http://www.facebook.com/note.php?note_id=10151244746810933</guid>
    <link>http://www.facebook.com/note.php?note_id=10151244746810933</link>
    <description>MySQL has two great features which historical haven&amp;#039;t played well together:Index-only queries:  In some cases, MySQL can resolve a query directly from the index, without having to read the underlying table.Prefix indexes:  This allows you to specify how many bytes to index, which can reduce index size or allow you to index the larger data types (ie. BLOB/TEXT).  The drawback being that the entire field isn&amp;#039;t stored in the index, so you can&amp;#039;t do index-only queries.One common optimization we do to reduce IOP consumption on database servers is to add additional columns to indexes in order to allow more queries to be index-only.  However, sometimes we have these large TEXT fields in order to allow for larger content -- even if the content is normally very small.For example:CREATE TABLE tbl (  id  INT PRIMARY KEY,  other_column INT,  txt_field MEDIUMTEXT,  INDEX (other_column, txt_field(100))) ENGINE=INNODB;SELECT txt_field FROM tbl WHERE idx = 5;MySQL will see that this is a prefix index and always have to read from the underlying table.  However in this case, if the content of txt_field is less than 100 bytes, we shouldn&amp;#039;t have to actually read the underlying table since the data is still fully contained for that row!  Our engineering team recently fixed this and it is available as a patch at:https://github.com/facebook/mysql-5.6/commit/4dd11b503085548f1c00bc927c7ae8b5bcb21626To enable this optimization, you can use:SET global innodb_prefix_index_cluster_optimization=1;And then we get a count of how many potential IOPS were saved due to this:SHOW GLOBAL STATUS LIKE &amp;#039;innodb_secondary_index_triggered_cluster_reads_avoided&amp;#039;;The best part is that this will work even when we have mixed situations, where some values are larger than the prefix and some are smaller.  Basically this is just always a good optimization (we can only disable it due to initial rollout testing).I hope that other distributions of InnoDB/XtraDB pick up this optimization as well.</description>
    <content:encoded><![CDATA[<div><p>MySQL has two great features which historical haven&#039;t played well together:</p><ol><li>Index-only queries:  In some cases, MySQL can resolve a query directly from the index, without having to read the underlying table.</li><li>Prefix indexes:  This allows you to specify how many bytes to index, which can reduce index size or allow you to index the larger data types (ie. BLOB/TEXT).  The drawback being that the entire field isn&#039;t stored in the index, so you can&#039;t do index-only queries.</li></ol><p><br /></p><p>One common optimization we do to reduce IOP consumption on database servers is to add additional columns to indexes in order to allow more queries to be index-only.  However, sometimes we have these large TEXT fields in order to allow for larger content -- even if the content is normally very small.</p><p><br /></p><p>For example:</p><p><br /></p><blockquote><p>CREATE TABLE tbl (</p><p>  id  INT PRIMARY KEY,</p><p>  other_column INT,</p><p>  txt_field MEDIUMTEXT,</p><p>  INDEX (other_column, txt_field(100))</p><p>) ENGINE=INNODB;</p><p><br /></p><p>SELECT txt_field FROM tbl WHERE idx = 5;</p></blockquote><p><br /></p><p>MySQL will see that this is a prefix index and always have to read from the underlying table.  However in this case, if the content of txt_field is less than 100 bytes, we shouldn&#039;t have to actually read the underlying table since the data is still fully contained for that row!  <br /></p><p><br /></p><p>Our engineering team recently fixed this and it is available as a patch at:</p><p><br /></p><p><a href="http://www.facebook.com/l.php?u=https://github.com/facebook/mysql-5.6/commit/4dd11b503085548f1c00bc927c7ae8b5bcb21626&amp;h=0AQHiD80r&amp;s=1" rel="nofollow" target="_blank">https://github.com/facebook/mysql-5.6/commit/4dd11b503085548f1c00bc927c7ae8b5bcb21626</a></p><p><br /></p><p>To enable this optimization, you can use:</p><p><br /></p><p>SET global innodb_prefix_index_cluster_optimization=1;</p><p><br /></p><p>And then we get a count of how many potential IOPS were saved due to this:</p><p><br /></p><p>SHOW GLOBAL STATUS LIKE &#039;innodb_secondary_index_triggered_cluster_reads_avoided&#039;;</p><p><br /></p><p><br /></p><p>The best part is that this will work even when we have mixed situations, where some values are larger than the prefix and some are smaller.  Basically this is just always a good optimization (we can only disable it due to initial rollout testing).<br /><br />I hope that other distributions of InnoDB/XtraDB pick up this optimization as well.<br /></p><br /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=67166&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=67166&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 15 May 2013 21:27:28 +0000</pubDate>
  </item>

  <item>
    <title>Slides from my Percona Live “Benchmarking” presentation</title>
    <guid isPermaLink="false">http://www.tokutek.com/?p=5757</guid>
    <link>http://www.tokutek.com/2013/05/slides-from-my-percona-live-benchmarking-presentation/</link>
    <description>I finally posted a copy of the slides from my Percona Live presentation, &amp;#8220;Creating a Benchmarking Infrastructure that Just Works&amp;#8221;.  The PDF is available via this link.
The content comes from my personal experiences over many years benchmarking and testing databases, usually focusing on performance.  It was an opportunity to see how far my personal benchmark infrastructure has evolved, but even better has inspired me to improve it in several areas.
I never had a chance to to my own post-conference wrap-up regarding the Percona Live show.  While waiting for my flight home at SFO airport I concluded that it was by far the best technology conference I&amp;#8217;ve ever attended.  The MySQL community is truly amazing and finally meeting many of the people that I&amp;#8217;ve only &amp;#8220;known&amp;#8221; online was great.  I&amp;#8217;m really looking forward to next year&amp;#8217;s event and ways I can contribute to existing benchmarking and testing projects.</description>
    <content:encoded><![CDATA[<p>I finally posted a <a href="http://www.tokutek.com/wp-content/uploads/2013/05/20130424-percona-live-benchmarking.pdf" target="_blank">copy of the slides</a> from my Percona Live presentation, &#8220;Creating a Benchmarking Infrastructure that Just Works&#8221;.  The PDF is available via <a href="http://www.tokutek.com/wp-content/uploads/2013/05/20130424-percona-live-benchmarking.pdf" target="_blank">this link</a>.</p>
<p>The content comes from my personal experiences over many years benchmarking and testing databases, usually focusing on performance.  It was an opportunity to see how far my personal benchmark infrastructure has evolved, but even better has inspired me to improve it in several areas.</p>
<p>I never had a chance to to my own post-conference wrap-up regarding the Percona Live show.  While waiting for my flight home at SFO airport I concluded that it was by far the best technology conference I&#8217;ve ever attended.  The MySQL community is truly amazing and finally meeting many of the people that I&#8217;ve only &#8220;known&#8221; online was great.  I&#8217;m really looking forward to next year&#8217;s event and ways I can contribute to existing benchmarking and testing projects.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=65836&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=65836&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 15 May 2013 19:43:10 +0000</pubDate>
    <dc:creator>Tokuview Blog</dc:creator>
    <category>TokuView</category>
    <category>benchmarking</category>
    <category>conference</category>
    <category>mysql</category>
    <category>MySQL User Conference</category>
    <category>Percona Live</category>
  </item>

  <item>
    <title>Calculating the InnoDB free space - part 2</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-1135944569112521190.post-1021121620430105730</guid>
    <link>http://databaseblog.myname.nl/2013/05/calculating-innodb-free-space-part-2.html</link>
    <description>This is part 2, you can find part 1 here.So in part 1 we learned how to calculate the free space within InnoDB. But unfortunately that won't always work perfectly.The first issue: the DATA_FREE column in the INFORMATION_SCHEMA.TABLES table will not show a sum of the free space of each partition. This means that if you have innodb_file_per_table disabled and are using partitioning then you must divide DATA_FREE by the number of partitions.This is Bug #36312.Example:mysql&amp;gt; SELECT CONCAT(T.TABLE_SCHEMA,'.',T.TABLE_NAME) AS TABLE_NAME,    -&amp;gt; P.PARTITION_NAME AS PART,IBT.SPACE,IBD.PATH,T.DATA_FREE AS T_DATA_FREE,    -&amp;gt; P.DATA_FREE AS P_DATA_FREE FROM INFORMATION_SCHEMA.TABLES T     -&amp;gt; LEFT JOIN INFORMATION_SCHEMA.PARTITIONS P ON P.TABLE_SCHEMA=T.TABLE_SCHEMA     -&amp;gt; AND P.TABLE_NAME=T.TABLE_NAME     -&amp;gt; LEFT JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES IBT     -&amp;gt; ON IBT.NAME=CONCAT(T.TABLE_SCHEMA,'/',T.TABLE_NAME)     -&amp;gt; OR IBT.NAME=CONCAT(T.TABLE_SCHEMA,'/',T.TABLE_NAME,'#P#',P.PARTITION_NAME)     -&amp;gt; LEFT JOIN INFORMATION_SCHEMA.INNODB_SYS_DATAFILES IBD     -&amp;gt; ON IBD.SPACE=IBT.SPACE WHERE ENGINE='InnoDB' ORDER BY T.TABLE_SCHEMA,T.TABLE_NAME;+----------------------------+------+-------+-----------------------------------+-------------+-------------+| TABLE_NAME                 | PART | SPACE | PATH                              | T_DATA_FREE | P_DATA_FREE |+----------------------------+------+-------+-----------------------------------+-------------+-------------+| innodbfreespacetest.t1     | NULL |     6 | ./innodbfreespacetest/t1.ibd      |     4194304 |     4194304 || innodbfreespacetest.t11    | p2   |     0 | NULL                              |   403701760 |    80740352 || innodbfreespacetest.t11    | p1   |     0 | NULL                              |   403701760 |    80740352 || innodbfreespacetest.t11    | p0   |     0 | NULL                              |   403701760 |    80740352 || innodbfreespacetest.t11    | p4   |     0 | NULL                              |   403701760 |    80740352 || innodbfreespacetest.t11    | p3   |     0 | NULL                              |   403701760 |    80740352 || innodbfreespacetest.t13    | NULL |    46 | ./innodbfreespacetest/t13.ibd     |     4194304 |     4194304 || innodbfreespacetest.t2     | NULL |     0 | NULL                              |    80740352 |    80740352 || innodbfreespacetest.t5     | p1   |     0 | NULL                              |   403701760 |    80740352 || innodbfreespacetest.t5     | p0   |     0 | NULL                              |   403701760 |    80740352 || innodbfreespacetest.t5     | p4   |     0 | NULL                              |   403701760 |    80740352 || innodbfreespacetest.t5     | p3   |     0 | NULL                              |   403701760 |    80740352 || innodbfreespacetest.t5     | p2   |     0 | NULL                              |   403701760 |    80740352 || innodbfreespacetest.t6     | p4   |    15 | ./innodbfreespacetest/t6#P#p4.ibd |           0 |           0 || innodbfreespacetest.t6     | p3   |    14 | ./innodbfreespacetest/t6#P#p3.ibd |           0 |           0 || innodbfreespacetest.t6     | p2   |    13 | ./innodbfreespacetest/t6#P#p2.ibd |           0 |           0 || innodbfreespacetest.t6     | p1   |    12 | ./innodbfreespacetest/t6#P#p1.ibd |           0 |           0 || innodbfreespacetest.t6     | p0   |    11 | ./innodbfreespacetest/t6#P#p0.ibd |           0 |           0 || mysql.innodb_index_stats   | NULL |     2 | ./mysql/innodb_index_stats.ibd    |           0 |           0 || mysql.innodb_table_stats   | NULL |     1 | ./mysql/innodb_table_stats.ibd    |           0 |           0 || mysql.slave_master_info    | NULL |     4 | ./mysql/slave_master_info.ibd     |           0 |           0 || mysql.slave_relay_log_info | NULL |     3 | ./mysql/slave_relay_log_info.ibd  |           0 |           0 || mysql.slave_worker_info    | NULL |     5 | ./mysql/slave_worker_info.ibd     |           0 |           0 |+----------------------------+------+-------+-----------------------------------+-------------+-------------+23 rows in set (0.05 sec)This example is on MySQL 5.6.10.Tables t1 and t13 have their own tablespace.Table t2 is in the system tablespace.Tables t5 and t11 are partitioned and in the system tablespace, these tables show the real DATA_FREE multiplied by the number of partitions. The DATA_FREE for individual partitions is correct. &amp;nbsp;For some old 5.1 versions the DATA_FREE might be show in kilobytes instead of bytes. (and there is no column in which the measurement unit size is stored)</description>
    <content:encoded><![CDATA[This is part 2, you can find part 1 <a href="http://databaseblog.myname.nl/2013/05/calculating-innodb-free-space.html">here</a>.<br /><br />So in part 1 we learned how to calculate the free space within InnoDB. But unfortunately that won't always work perfectly.<br /><br />The first issue: the DATA_FREE column in the INFORMATION_SCHEMA.TABLES table will not show a sum of the free space of each partition. This means that if you have innodb_file_per_table disabled and are using partitioning then you must divide DATA_FREE by the number of partitions.<br />This is <a href="http://bugs.mysql.com/bug.php?id=36312">Bug #36312</a>.<br /><br />Example:<br /><pre>mysql&gt; SELECT CONCAT(T.TABLE_SCHEMA,'.',T.TABLE_NAME) AS TABLE_NAME,<br />    -&gt; P.PARTITION_NAME AS PART,IBT.SPACE,IBD.PATH,T.DATA_FREE AS T_DATA_FREE,<br />    -&gt; P.DATA_FREE AS P_DATA_FREE FROM INFORMATION_SCHEMA.TABLES T <br />    -&gt; LEFT JOIN INFORMATION_SCHEMA.PARTITIONS P ON P.TABLE_SCHEMA=T.TABLE_SCHEMA <br />    -&gt; AND P.TABLE_NAME=T.TABLE_NAME <br />    -&gt; LEFT JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES IBT <br />    -&gt; ON IBT.NAME=CONCAT(T.TABLE_SCHEMA,'/',T.TABLE_NAME) <br />    -&gt; OR IBT.NAME=CONCAT(T.TABLE_SCHEMA,'/',T.TABLE_NAME,'#P#',P.PARTITION_NAME) <br />    -&gt; LEFT JOIN INFORMATION_SCHEMA.INNODB_SYS_DATAFILES IBD <br />    -&gt; ON IBD.SPACE=IBT.SPACE WHERE ENGINE='InnoDB' ORDER BY T.TABLE_SCHEMA,T.TABLE_NAME;<br />+----------------------------+------+-------+-----------------------------------+-------------+-------------+<br />| TABLE_NAME                 | PART | SPACE | PATH                              | T_DATA_FREE | P_DATA_FREE |<br />+----------------------------+------+-------+-----------------------------------+-------------+-------------+<br />| innodbfreespacetest.t1     | NULL |     6 | ./innodbfreespacetest/t1.ibd      |     4194304 |     4194304 |<br />| innodbfreespacetest.t11    | p2   |     0 | NULL                              |   403701760 |    80740352 |<br />| innodbfreespacetest.t11    | p1   |     0 | NULL                              |   403701760 |    80740352 |<br />| innodbfreespacetest.t11    | p0   |     0 | NULL                              |   403701760 |    80740352 |<br />| innodbfreespacetest.t11    | p4   |     0 | NULL                              |   403701760 |    80740352 |<br />| innodbfreespacetest.t11    | p3   |     0 | NULL                              |   403701760 |    80740352 |<br />| innodbfreespacetest.t13    | NULL |    46 | ./innodbfreespacetest/t13.ibd     |     4194304 |     4194304 |<br />| innodbfreespacetest.t2     | NULL |     0 | NULL                              |    80740352 |    80740352 |<br />| innodbfreespacetest.t5     | p1   |     0 | NULL                              |   403701760 |    80740352 |<br />| innodbfreespacetest.t5     | p0   |     0 | NULL                              |   403701760 |    80740352 |<br />| innodbfreespacetest.t5     | p4   |     0 | NULL                              |   403701760 |    80740352 |<br />| innodbfreespacetest.t5     | p3   |     0 | NULL                              |   403701760 |    80740352 |<br />| innodbfreespacetest.t5     | p2   |     0 | NULL                              |   403701760 |    80740352 |<br />| innodbfreespacetest.t6     | p4   |    15 | ./innodbfreespacetest/t6#P#p4.ibd |           0 |           0 |<br />| innodbfreespacetest.t6     | p3   |    14 | ./innodbfreespacetest/t6#P#p3.ibd |           0 |           0 |<br />| innodbfreespacetest.t6     | p2   |    13 | ./innodbfreespacetest/t6#P#p2.ibd |           0 |           0 |<br />| innodbfreespacetest.t6     | p1   |    12 | ./innodbfreespacetest/t6#P#p1.ibd |           0 |           0 |<br />| innodbfreespacetest.t6     | p0   |    11 | ./innodbfreespacetest/t6#P#p0.ibd |           0 |           0 |<br />| mysql.innodb_index_stats   | NULL |     2 | ./mysql/innodb_index_stats.ibd    |           0 |           0 |<br />| mysql.innodb_table_stats   | NULL |     1 | ./mysql/innodb_table_stats.ibd    |           0 |           0 |<br />| mysql.slave_master_info    | NULL |     4 | ./mysql/slave_master_info.ibd     |           0 |           0 |<br />| mysql.slave_relay_log_info | NULL |     3 | ./mysql/slave_relay_log_info.ibd  |           0 |           0 |<br />| mysql.slave_worker_info    | NULL |     5 | ./mysql/slave_worker_info.ibd     |           0 |           0 |<br />+----------------------------+------+-------+-----------------------------------+-------------+-------------+<br />23 rows in set (0.05 sec)<br /></pre><br />This example is on MySQL 5.6.10.<br>Tables t1 and t13 have their own tablespace.<br>Table t2 is in the system tablespace.<br>Tables t5 and t11 are partitioned and in the system tablespace, these tables show the real DATA_FREE multiplied by the number of partitions. The DATA_FREE for individual partitions is correct. <br />&nbsp;<br />For some old 5.1 versions the DATA_FREE might be show in kilobytes instead of bytes. (and there is no column in which the measurement unit size is stored)<br /><br /><br /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=63728&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=63728&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 15 May 2013 16:21:00 +0000</pubDate>
    <dc:creator>Daniel van Eeden</dc:creator>
    <category>mysql</category>
    <category>innodb</category>
    <category>information_schema</category>
  </item>

  <item>
    <title>The Outer Join to Inner Join Coversion</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-4934478127523643312.post-2087765769502606641</guid>
    <link>http://optimize-this.blogspot.com/2013/05/the-outer-join-to-inner-join-coversion.html</link>
    <description>It is a central part of the MySQL philisophy to try and help you as much as you can. There are many occasions when it could tell you that what you are asking for is utterly stupid or give you a bad execution plan because &quot;you asked for it&quot;. But we're friendly here. We don't do that. One of those cases is when you run a query with an outer join but you really meant an inner join, or you don't care.Inner joins are almost always cheaper to execute than outer joins and that is why MySQL rewrites them to inner joins whenever it can.An outer join may have&amp;nbsp;WHERE&amp;nbsp;conditions on any of the columns in the result set. In fact, it is a common trick to find non-matching rows using the&amp;nbsp;IS NULL&amp;nbsp;predicate. Here's an example:TABLE personname &amp;nbsp;idTom &amp;nbsp; 1Dick &amp;nbsp;2Harry 3TABLE carbrand owner_id mfg_yearChevy 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2007Volvo 3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2008The query&amp;nbsp;SELECT name&amp;nbsp;FROM person LEFT OUTER JOIN car ON id = owner_id&amp;nbsp;WHERE brand IS NULL&amp;nbsp;would give you the names of people that don't have a car.&amp;nbsp;The IS NULL predicate is&amp;nbsp;TRUE&amp;nbsp;for an&amp;nbsp;UNKNOWN&amp;nbsp;value. Nearly all other predicates are what we refer to as&amp;nbsp;null-rejecting. A null-rejecting predicate is one that is&amp;nbsp;UNKNOWN if any of its arguments is UNKNOWN. This goes for most SQL predicates: &amp;gt;, &amp;lt;, =.On the top-level of the where clause, there is an implicit IS TRUE predicate. This way you never get to see rows where it is unknown if they match your search condition or not. So the where clause in our query above is equivalent toWHERE brand IS NULL IS TRUEWe could also querySELECT nameFROM person LEFT OUTER JOIN car ON id = owner_idWHERE mfg_year = 2008 IS UNKNOWNThe result of which would be &quot;Dick&quot;, because it is indeed unknown if Dick's car was made in 2008 if he doesn't have a car. Computation wise, the condition is evaluated bottom-up: UNKNOWN = 2008 is UNKNOWN.We are now ready to turn this notion into a rule-of-thumb: If there are predicates in the where clause that are not nested inside predicates that turn UNKNOWN into TRUE, for example&amp;nbsp;IS NULL or IS UNKNOWN (i.e. null-rejecting), then we can turn the outer join into an inner join before we optimize, because the result set is the same.&amp;nbsp;Unfortunately this translation does not show up in EXPLAIN, but it does in the optimizer trace. Here's how to see it.SET optimizer_trace=&quot;enabled=on&quot;;SELECT nameFROM person LEFT OUTER JOIN car ON id = owner_idWHERE mfg_year = 2008;+-------+| name &amp;nbsp;|+-------+| Harry |+-------+SELECT trace FROM information_schema.optimizer_trace;...&amp;nbsp; &amp;nbsp; {&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;join_optimization&quot;: {&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;select#&quot;: 1,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;steps&quot;: [&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;transformations_to_nested_joins&quot;: {&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;transformations&quot;: [&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;outer_join_to_inner_join&quot;,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;JOIN_condition_to_WHERE&quot;,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;parenthesis_removal&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;expanded_query&quot;: &quot;/* select#1 */ select `person`.`name` AS `name` from `person` join `car` where ((`car`.`mfg_year` = 2008) and (`person`.`id` = `car`.`owner_id`))&quot;...</description>
    <content:encoded><![CDATA[<div dir="ltr" trbidi="on"><div dir="ltr" trbidi="on"><br />It is a central part of the MySQL philisophy to try and help you as much as you can. There are many occasions when it <i>could</i> tell you that what you are asking for is utterly stupid or give you a bad execution plan because "you asked for it". But we're friendly here. We don't do that. One of those cases is when you run a query with an outer join but you really meant an inner join, or you don't care.<br /><br />Inner joins are almost always cheaper to execute than outer joins and that is why MySQL rewrites them to inner joins whenever it can.<br /><br />An outer join may have&nbsp;<span>WHERE</span>&nbsp;conditions on any of the columns in the result set. In fact, it is a common trick to find non-matching rows using the&nbsp;<span>IS NULL</span><span>&nbsp;predicate. Here's an example:</span><br /><span><br /></span><span>TABLE person</span><br /><span><br /></span><span>name &nbsp;<u>id</u></span><br /><span>Tom &nbsp; 1</span><br /><span>Dick &nbsp;2</span><br /><span>Harry 3</span><br /><span><br /></span><span>TABLE car</span><br /><span><br /></span><span>brand owner<i>_</i>id mfg_year</span><br /><span>Chevy 1 &nbsp; &nbsp; &nbsp; &nbsp;2007</span><br /><span>Volvo 3 &nbsp; &nbsp; &nbsp; &nbsp;2008</span><br /><span><br /></span><span>The query&nbsp;</span><span>SELECT name&nbsp;</span><span>FROM person LEFT OUTER JOIN car ON id = owner</span><span>_</span><span>id&nbsp;</span><span>WHERE brand IS NULL&nbsp;</span><span>would give you the names of people that don't have a car.&nbsp;</span><span>The </span><span>IS NULL</span><span> predicate is&nbsp;</span><span>TRUE</span><span>&nbsp;for an&nbsp;</span><span>UNKNOWN</span><span>&nbsp;value. Nearly all other predicates are what we refer to as&nbsp;<i>null-rejecting</i>. A null-rejecting predicate is one that is&nbsp;</span><span>UNKNOWN</span><span> if any of its arguments is </span><span>UNKNOWN</span><span>. This goes for most SQL predicates: &gt;, &lt;, =.</span><br /><span><br /></span><span>On the top-level of the where clause, there is an implicit </span><span>IS TRUE</span><span> predicate. This way you never get to see rows where it is unknown if they match your search condition or not. So the where clause in our query above is equivalent to</span></div><br /><span>WHERE brand IS NULL IS TRUE</span><br /><br />We could also query<br /><br /><span>SELECT name</span><br /><span>FROM person LEFT OUTER JOIN car ON id = owner<u>_</u>id</span><br /><span>WHERE mfg_year = 2008 IS UNKNOWN</span><br /><div><span><br /></span></div><div><span>The result of which would be </span><span>"Dick"</span><span>, because it is indeed unknown if Dick's car was made in 2008 if he doesn't have a car. Computation wise, the condition is evaluated bottom-up: </span><span>UNKNOWN</span><span> = 2008 is </span><span>UNKNOWN</span><span>.</span></div><div><span><br /></span></div><div><span>We are now ready to turn this notion into a rule-of-thumb: If there are predicates in the where clause that are not nested inside predicates that turn </span><span>UNKNOWN</span><span> into </span><span>TRUE</span><span>, for example&nbsp;</span><span>IS NULL</span><span> or </span><span>IS UNKNOWN</span><span> (i.e. null-rejecting), then we can turn the outer join into an inner join before we optimize, because the result set is the same.&nbsp;</span>Unfortunately this translation does not show up in <span>EXPLAIN</span>, but it does in the optimizer trace. Here's how to see it.</div><br /><span>SET optimizer_trace="enabled=on";</span><br /><span><br /></span><br /><span>SELECT name</span><br /><span>FROM person LEFT OUTER JOIN car ON id = owner_id</span><br /><span>WHERE mfg_year = 2008;</span><br /><span>+-------+</span><br /><span>| name &nbsp;|</span><br /><span>+-------+</span><br /><span>| Harry |</span><br /><span>+-------+</span><br /><span>SELECT trace FROM information_schema.optimizer_trace;</span><br />...<br /><br /><span>&nbsp; &nbsp; {</span><br /><span>&nbsp; &nbsp; &nbsp; "join_optimization": {</span><br /><span>&nbsp; &nbsp; &nbsp; &nbsp; "select#": 1,</span><br /><span>&nbsp; &nbsp; &nbsp; &nbsp; "steps": [</span><br /><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</span><br /><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "transformations_to_nested_joins": {</span><br /><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "transformations": [</span><br /><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "<span>outer_join_to_inner_join</span>",</span><br /><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "JOIN_condition_to_WHERE",</span><br /><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "parenthesis_removal"</span><br /><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],</span><br /><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "expanded_query": "/* select#1 */ select `person`.`name` AS `name` from `person` join `car` where ((`car`.`mfg_year` = 2008) and (`person`.`id` = `car`.`owner_id`))"</span><br /><br />...</div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59654&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59654&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 15 May 2013 12:41:00 +0000</pubDate>
    <dc:creator>Martin Hansson</dc:creator>
  </item>

  <item>
    <title>Year of Anniversaries</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-14455177.post-4636054410516356000</guid>
    <link>http://mikaelronstrom.blogspot.com/2013/05/year-of-anniversaries.html</link>
    <description>Many people write blogs and emails about various anniversaries. I had an anniversary when I started writing this blog on the 2 may where I celebrated 23 years since I my start date according to my employment contract. 2 may 1990 was the first day I worked at Ericsson where I started working on databases and where NDB Cluster was born that later grew into MySQL Cluster.Actually this is a year of anniversaries for me. I started by becoming half a century old a few months ago, then I celebrated a quarter of a century as member in the LDS church, my wife and I just celebrated our 25th wedding day and in september I will celebrate 10 years of working with MySQL together with the other people that joined MySQL from Ericsson 10 years ago.So I thought this was an appropriate timing to write down a little history of my career and particulary focused on how it relates to MySQL and MySQL Cluster. The purpose of this isn't to publish any new technical facts, the purpose is more to provide some input to those interested in the history of software development. I am personally very interested in history and always enjoy telling a good story, particularly when it is a true story. I think however that the most important reason to write this blog is to help young software engineers to understand both the challenges they will face and also that the path to success sometimes or even most of the time is a road that contains many road blocks and even complete changes.I will start the story at the university where I studied mathematical statistics, I learned to enjoy hard work and challenges when I somewhat by chance found myself studying at a university while still attending last year of gymnasium (similar to last year of high school) and also working half-time. This challenge taught me to work hard and that overcoming challenges was quite fun (a lot more fun than easy work) when you come out on top.I remember when I started working after the university that I was looking at two options, either work with data communication or work with databases. I selected to work with data communication! This meant that I learned a lot about low level stuff and working on X.25 protocols, SNA protocols and often programming in obscure assembler code. This has been a very important competence all through my career since it means that I have always had a good understanding of the performance aspects of the programs I have analysed and written.In 1989 I had some personal inspiration that I would study for a Ph.D in mathematics and databases. I didn't have any possibility to start this immediately. However when I started working at Ericsson the 2nd of May 1990 in their education department I could quickly extend my competence through learning Object oriented programming, C++, telecommunication, advanced system testing and many other things. In march 1991 the opportunity to start learning about databases appeared as they were to develop a new course on an internal Ericsson database. Later the same year I saw an internal job offering at the Ericsson systems department working with system aspects of this internal Ericsson database. So in 1991 my career in databases went off to a start. Late 1991 I heard of a large research project about UMTS (what is today called 3G) where Ericsson participated. I went to my manager and asked him if I could spend a third of my time over the next few years on this project. He accepted and a few months later he also accepted that I went to half my time on this research project. My manager Martin Hänström and my department manager Göran Ahlforn and their vision of future telecom databases was crucial to the development of MySQL Cluster although they never at any time were involved in its actual development.This project was called RACE MONET and involved hundreds of researcher in Europe and I learned a lot about network databases and the requirements that they would see the next few decades. This meant that I could start my Ph.D. studies in mathematics and databases. I spent a few years reading database theory, understanding more about future telecommunication systems. I developed a few high-level models for how to build a distributed database, but it took a few years to come up with the model now used in MySQL Cluster data nodes. In those days I actually focused so much on reading and thinking that I didn't even see a need to have a computer on my desk.I had some interesting collaboration with a norwegian team of database researchers that meant that we were very close to joining forces in 1994 on a project on developing a distributed database. We did eventually join forces 14 years later when MySQL was acquired by Sun and the ClustRa team (ClustRa had been acquired by Sun a few years earlier) joined the MySQL team as the Sun database team. Today this team is an important part of all parts of the MySQL development but through history we have had many occasions of both collaboration and competing in the marketplace.After studying a lot for 3-4 years I had a very interesting period in 1995 and 1996 where all my studying went into the idea phase. Through understanding of both requirements on a telecom database and database theory I had a period of constant innovation, a new idea popped up more than once per week and I was constantly thinking of new interesting ideas, a lot of new ideas popped up while I was out running.With all these ideas I had the theoretical foundation of NDB Cluster that later turned into MySQL Cluster. Not a single code line was yet written, but most high-level algorithms was written down in my Ph.D thesis that I eventually finalised in 1998.Now the time had come to actually start developing NDB Cluster. I remember driving by a new compound where we were supposed to move to in a few months later and I told a friend that in this new building my 5th kid, NDB, will be born. In the beginning I had no resources, but at Ericsson it was easy to hire summer students and master thesis students. So in a few years I worked with 30-40 summer students and 10 master thesis students. Most of these students focused on special areas and prototyped some idea, this period was extremely important since many of the early ideas wasn't so bright and the student works proved that we were on the wrong path. I remember especially a prototype of the communication protocol to the database, the prototype used BER encoding and only the protocol code was a few thousand lines of code. It was clearly not the right path and we went for a much more fixed protocol which actually evolved in six different versions in a short time to end where it is today. The NDB protocol is entirely based on 32-bit unsigned integers and most data are in fixed positions with a few exceptions where bits are used to shave off a few words from the message.The first steps in the NDB development was completely intertwined with the other half of my work at Ericsson. This work entailed building a virtual machine for the APZ processor that was an Ericsson-developed CPU that powered the AXE switches which was a very important part of the Ericsson offering. In 1998 we developed a prototype of this virtual machine which was faster than any other APZ processor available at the time. This project was eventually brought into real products, personally I haven't done anything in this area the last 10 years. This intertwining of projects was important to get funding for the first phases of the NDB development and in the second half of 1997 we started up a real development project for NDB Cluster. The aim of the project was to build a prototype together with an operator to demonstrate low-latency communication towards an external database from AXE thus providing easy maintenance of various telecom services. The intertwining happened since NDB was executed in this virtual machine. There are still remnants of this virtual machine in the NDB code in the form of signals between blocks.We ran this project at full speed for one year with up to 30 people involved. This project brought NDB from version 0.1 to version 0.3 and much of the code for version 0.4 was also written. The first NDB API was developed here based on some ideas from the telecom operator and much of the transaction protocols and data structures. The project was brought to a successful conclusion. There was however no continuation of the project since Ericsson decided to focus their resources on another internal database project. So most of 1999 the project continued as a skunk-work project. For about half a year I was the single person involved in the project and spent a lot of time in fixing various bugs, mostly in the hash index part and replaced the hash function with the MD5 crypto function.The NDB API is based on a very simple record access model that makes it possible to access individual rows, scan tables and scan using an ordered index. Most relational databases have a similar functional split in their software. Since my research into requirements on telecom databases showed that almost all queries are very simple queries that are part of the traffic protocols it seemed like a very good idea to make this interface visible to the application developers. Also research into other application areas such as genealogy, email servers and charging applications showed similar needs.Today MySQL Cluster still benefits from this record level API that makes it easy to integrate MySQL Cluster also for big data applications. It has also made it easy to make other types of interfaces to the data nodes such as LDAP interface and Java interfaces and so forth.Eventually I wrote an email to the Ericsson CEO, the email was focused on the use of NDB for a web cache server that we prototyped together with the Ericsson IT department. The email was sent back to my organisation which quickly ignored it, but the CEO also sent the email on to a new Ericsson organisation, Ericsson Business Development. I met with one of the key people in this organisation, Gunnar Tyrsing, whom I got to know when we both participated in a Ph.D course on data communication. He had done a fast career in developing the Japanese 2G mobile system. He was therefore a manager that understood both technology and management and he quickly understood the possibilities of NDB. He forwarded the assignment to work with me to Ton Keppel who became the manager of NDB development the next 3 years.Together with Ton Keppel I built up a new NDB organisation and we hired a lot of people 2000-2002, many of those are still working at MySQL, some of them in MySQL Cluster development but also a few in management positions. One of the first things we did was to convert the NDB code into a C++ program.Those days were interesting, but very hectic, I even had my own personal secretary for a period when I had meetings all the time, developer meetings, management meetings, meetings with our owner Ericsson Business Innovation, meetings with potential customers and many, many meetings with potential investors. I participated in a course in 2000 on Innovation in a large organisation where I learned a lot about marketing and we visited a number of VCs in the US. While visiting one of these VCs in april 2001 I remember him stating that 2 weeks previously the market for business to business web sites had imploded. This was the first sign of the IT crash I saw. Half a year later the problems came to us. In 2000 we had access to an almost unlimited budget and at the end of 2001 we started working with a more normal and constrained budget. At this time the number of ventures was decreased from 30 to 5 in half a year. So every week a new venture was closed so we all knew that our venture could be closed at any time. Somehow we managed to survive and we were one of the 5 remaining ventures that was left after downsizing completed.We refocused our efforts towards the telecom market after the IT crash, our first target market was the stock exchange market which wasn't a bright market after the stock market going for the worse. This meant that we finalised all the work on node recovery and system recovery that was started in 1998-1999. We found a first telecom customer in Bredbandsbolaget and they developed a number of their key network applications using MySQL Cluster which later many other customers have replicated.At this time in history all telecom vendors were bleeding and downsizing. Ericsson downsized from 110.000 employees to around 47.000 employees in a two-year period. So eventually the turn came also to Ericsson Business Innovation. All remaining ventures including us had to start searching for new owners. Actually the quality of the ventures was at this point very high since all of them managed to find new owners in just a few summer months in 2003.So the 2 september 2003 the acquisition of NDB into MySQL was completed and the NDB team was now part of the MySQL team. Our team came into MySQL at a very early point and increased the number of employees in MySQL significantly at the time.Our team continued working with existing customers and we also started on integrating the NDB Cluster storage engine into MySQL. We decided to call the combined MySQL and NDB product MySQL Cluster and this name is what we still use.After less than a year of working at MySQL the VP of Engineering Maurizio Gianola approached me and he had decided that I should work on new assignments. This happened exactly at the time when the commercial success of MySQL Cluster started to happen. Obviously after working on a project for more than 10 years it was hard to all of a sudden to start working on a new project. Interestingly I think it was good for me as a person to do this shift. What happened was that NDB was ready for success and needed a lot of detailed work on bugs, support, sales and new features for the customers. I have always been an innovator and therefore moving into a new project meant that I could innovate something new.The new project I got involved in was MySQL partitioning. At first I had to learn the MySQL Server inside out and in particular I had to learn the MySQL parser which was far away from my expertise areas. I had great help of Anthony Curtis in this time and I spent about one year developing the code and one year fixing the bugs before it was released as part of MySQL 5.1. I had seriously good help in the QA part of this project where Matthias Leich helped me writing me many new test programs that exercised the new partitioning code. Also Peter Gulutzan had a special genius of finding out how to write test cases that found bugs. When I saw his test cases I quickly concluded that he had a lot of imagination of how to use SQL.Working with MySQL code improved my skills as a programmer. In the Ericsson environment I learned to work on an architecturial level. At Ericsson I developed mind models that I finally &quot;dumped&quot; into source code. At MySQL I learned more about the actual coding skills.At this point in time I decided to make something revolutionary in my life, I resigned from MySQL and started working as an independent consultant. I always want to have a feeling that things are moving upwards and at this point in my life I didn't get this feeling. So I decided to be a bit revolutionary and take some risks. I had a large family with 5 kids at the time and financially it was a bit of an adventure. It did however work out very well. I still continued to dabble with MySQL development as a consultant part-time, but I also worked with other companies. I worked a lot with a norwegian company, Dolphin, that I helped develop marketing material for their network cards that could be used in combination with MySQL Cluster. I also worked as a MySQL consultant in the Stockholm area, I even developed a completely brand new 3-day MySQL course in 12 days, I produced 300 new slides in a short time. It was a fun time and the company went well and I booked around 45 consultancy hours per week so financially I came out quite ok.As part of this company I also started developing my own hobby project, iClaustron, I am still developing it. It's mainly an educational project for me, but eventually I might release the code, after 7 years I produced around 60.000 lines of code and it starts to actually do something useful :).Meanwhile MySQL had found a new VP of Engineering in Jeffrey Pugh and he was looking for a Senior MySQL Architect. He gave me an offering I could not refuse, it both meant that I returned to having a feeling of going upwards in my career and also financially ok. Initially I worked mostly on getting a lot of rock stars to communicate. We had a number of strong outspoken architects in the organisation, many of which were very well-known in the MySQL world, we also had a number of competent, but less outspoken architects. So my work was to try to get these people to get to an agreement on techical development which wasn't always so easy. We did however manage to shield off the developers from the technical debates and ensure that instead of debating each new feature in a large group, we allowed the developers to work with one or two architects in developing the new features. This has paid off well now in that our developers are much more independent in the current development organisation.At the end of 2008 it became clear that MySQL was in great need of a scalability project, at this time we were part of Sun after being acquired early 2008 and we had a skilled Sun team assisting us in this project. Given my background in performance-oriented design I dedicated much of my time over the next two years to this project. We delivered a breakthrough scalability project about once per year at the MySQL conference. The first one in 2009 we also got word of the Oracle acquisition. Personally I met a person coming out of the elevator at 7am coming to breakfast who asked how I felt about being acquired by Oracle. We have continued on this trend of delivering new scalability enhancements all the way until now when MySQL 5.6 was released with substantial performance enhancements and we've come a really long way on this path since we started this development almost 5 years ago.In the meantime I also worked with Kelly Long to develop the MySQL Thread Pool design. There was a previous design in the MySQL 6.0 project, this design didn't scale and we opted for a completely new design based on splitting connections into thread groups. Kelly Long left MySQL to do a new startup in the networked storage business and this week I read how he sold his new venture for 119M$, so working with MySQL means working with many talented people. The thread pool design was recently updated for MySQL 5.6 and its design rocks also at a very much higher throughput.The last few years have seen a lot of tremendous performance improvements in various areas. Much of the scalability improvements now happen as part of the normal engineering process and I mainly focus on helping out in small directed projects. So I helped out with the split of the LOCK_open mutex and the increased scalability of the binlog group commit writes and resolving the bottleneck in InnoDB we called G5 which essentially was a 1-liner problem.Other areas I have focused my attention on has been back to MySQL Cluster, in MySQL Cluster 7.2 we increased scalability of MySQL Cluster by almost 10x through adding possibilities for multiple send threads, multiple receive threads, multiple TC threads and scaling to even more local database threads (LDM threads). In MySQL Cluster 7.3 I just completed a much improved scalability of the NDB API.For me the last few years have been interesting, I have had some tough health issues, but at the same time the efforts we have done have paid off in ways never seen before. We've increased performance of the MySQL Server by 3.3x, we've increased performance of MySQL Cluster by almost 10x, we've demonstrated 1 billion updates per minute in MySQL Cluster and we're ready to scale MySQL Cluster 7.3 to hundreds of millions reads per second.I tend to call the things I've done the last few years surgery. I go into working code, find the hot-spots and find ways to remove these hot-spots. The patches to do this is usually very small but one needs to be very careful in the changes since they touch parts of the code that are extremely central. As with real surgery the impact of these surgical patches can be astounding.So where does the future take us, well there are still many interesting things to further develop. Every time we put some effort into parallelising some part of the MySQL code we can expect at least a 10x speedup. There is possibilities to speed up local code in most areas, there is possibilities to use the dramatic surge of CPU power to use compression even for main memory data. There is lots of tools that we can build around MySQL that provides more scalability, more high availability. We also know that the HW industry is innovating and they are likely to put things on our table that enables new things we never dreamed of doing before. One thing I particularly look forward to is when the HW industry can replace hard drives by something similar to DRAM's that have a persistent memory. When this happens it can change a lot of things we currently take for granted.I found in my career that as an innovator it's important to be ready to let go of your development and put it into other people's competent hands. This means that one can move on to new areas. If one continues to work in the same organisation one can then always return to the old work areas. So I still do a lot of work in MySQL Cluster, I still review work done on MySQL partitioning, I still participate in working on the MySQL thread pool, I still help out on various MySQL scalability projects and there is even some new projects yet to be released where I continue in the review role after helping out in the early phases.I did however leave one project solely to myself and this is the iClaustron project. It's nice to be able to work on something completely without regard to any other person's view and do exactly as I please. It's refreshing to do this every now and then and for me it has served as a very important tool to keep me up-to-date on build tools, code organisation, modularisation of code and many other aspects of software engineering.</description>
    <content:encoded><![CDATA[<div dir="ltr" trbidi="on">Many people write blogs and emails about various anniversaries. I had an anniversary when I started writing this blog on the 2 may where I celebrated 23 years since I my start date according to my employment contract. 2 may 1990 was the first day I worked at Ericsson where I started working on databases and where NDB Cluster was born that later grew into MySQL Cluster.<br /><br />Actually this is a year of anniversaries for me. I started by becoming half a century old a few months ago, then I celebrated a quarter of a century as member in the LDS church, my wife and I just celebrated our 25th wedding day and in september I will celebrate 10 years of working with MySQL together with the other people that joined MySQL from Ericsson 10 years ago.<br /><br />So I thought this was an appropriate timing to write down a little history of my career and particulary focused on how it relates to MySQL and MySQL Cluster. The purpose of this isn't to publish any new technical facts, the purpose is more to provide some input to those interested in the history of software development. I am personally very interested in history and always enjoy telling a good story, particularly when it is a true story. I think however that the most important reason to write this blog is to help young software engineers to understand both the challenges they will face and also that the path to success sometimes or even most of the time is a road that contains many road blocks and even complete changes.<br /><br />I will start the story at the university where I studied mathematical statistics, I learned to enjoy hard work and challenges when I somewhat by chance found myself studying at a university while still attending last year of gymnasium (similar to last year of high school) and also working half-time. This challenge taught me to work hard and that overcoming challenges was quite fun (a lot more fun than easy work) when you come out on top.<br /><br />I remember when I started working after the university that I was looking at two options, either work with data communication or work with databases. I selected to work with data communication! This meant that I learned a lot about low level stuff and working on X.25 protocols, SNA protocols and often programming in obscure assembler code. This has been a very important competence all through my career since it means that I have always had a good understanding of the performance aspects of the programs I have analysed and written.<br /><br />In 1989 I had some personal inspiration that I would study for a Ph.D in mathematics and databases. I didn't have any possibility to start this immediately. However when I started working at Ericsson the 2nd of May 1990 in their education department I could quickly extend my competence through learning Object oriented programming, C++, telecommunication, advanced system testing and many other things. In march 1991 the opportunity to start learning about databases appeared as they were to develop a new course on an internal Ericsson database. Later the same year I saw an internal job offering at the Ericsson systems department working with system aspects of this internal Ericsson database. So in 1991 my career in databases went off to a start. Late 1991 I heard of a large research project about UMTS (what is today called 3G) where Ericsson participated. I went to my manager and asked him if I could spend a third of my time over the next few years on this project. He accepted and a few months later he also accepted that I went to half my time on this research project. My manager Martin Hänström and my department manager Göran Ahlforn and their vision of future telecom databases was crucial to the development of MySQL Cluster although they never at any time were involved in its actual development.<br /><br />This project was called RACE MONET and involved hundreds of researcher in Europe and I learned a lot about network databases and the requirements that they would see the next few decades. This meant that I could start my Ph.D. studies in mathematics and databases. I spent a few years reading database theory, understanding more about future telecommunication systems. I developed a few high-level models for how to build a distributed database, but it took a few years to come up with the model now used in MySQL Cluster data nodes. In those days I actually focused so much on reading and thinking that I didn't even see a need to have a computer on my desk.<br /><br />I had some interesting collaboration with a norwegian team of database researchers that meant that we were very close to joining forces in 1994 on a project on developing a distributed database. We did eventually join forces 14 years later when MySQL was acquired by Sun and the ClustRa team (ClustRa had been acquired by Sun a few years earlier) joined the MySQL team as the Sun database team. Today this team is an important part of all parts of the MySQL development but through history we have had many occasions of both collaboration and competing in the marketplace.<br /><br />After studying a lot for 3-4 years I had a very interesting period in 1995 and 1996 where all my studying went into the idea phase. Through understanding of both requirements on a telecom database and database theory I had a period of constant innovation, a new idea popped up more than once per week and I was constantly thinking of new interesting ideas, a lot of new ideas popped up while I was out running.<br /><br />With all these ideas I had the theoretical foundation of NDB Cluster that later turned into MySQL Cluster. Not a single code line was yet written, but most high-level algorithms was written down in my Ph.D thesis that I eventually finalised in 1998.<br /><br />Now the time had come to actually start developing NDB Cluster. I remember driving by a new compound where we were supposed to move to in a few months later and I told a friend that in this new building my 5th kid, NDB, will be born. In the beginning I had no resources, but at Ericsson it was easy to hire summer students and master thesis students. So in a few years I worked with 30-40 summer students and 10 master thesis students. Most of these students focused on special areas and prototyped some idea, this period was extremely important since many of the early ideas wasn't so bright and the student works proved that we were on the wrong path. I remember especially a prototype of the communication protocol to the database, the prototype used BER encoding and only the protocol code was a few thousand lines of code. It was clearly not the right path and we went for a much more fixed protocol which actually evolved in six different versions in a short time to end where it is today. The NDB protocol is entirely based on 32-bit unsigned integers and most data are in fixed positions with a few exceptions where bits are used to shave off a few words from the message.<br /><br />The first steps in the NDB development was completely intertwined with the other half of my work at Ericsson. This work entailed building a virtual machine for the APZ processor that was an Ericsson-developed CPU that powered the AXE switches which was a very important part of the Ericsson offering. In 1998 we developed a prototype of this virtual machine which was faster than any other APZ processor available at the time. This project was eventually brought into real products, personally I haven't done anything in this area the last 10 years. This intertwining of projects was important to get funding for the first phases of the NDB development and in the second half of 1997 we started up a real development project for NDB Cluster. The aim of the project was to build a prototype together with an operator to demonstrate low-latency communication towards an external database from AXE thus providing easy maintenance of various telecom services. The intertwining happened since NDB was executed in this virtual machine. There are still remnants of this virtual machine in the NDB code in the form of signals between blocks.<br /><br />We ran this project at full speed for one year with up to 30 people involved. This project brought NDB from version 0.1 to version 0.3 and much of the code for version 0.4 was also written. The first NDB API was developed here based on some ideas from the telecom operator and much of the transaction protocols and data structures. The project was brought to a successful conclusion. There was however no continuation of the project since Ericsson decided to focus their resources on another internal database project. So most of 1999 the project continued as a skunk-work project. For about half a year I was the single person involved in the project and spent a lot of time in fixing various bugs, mostly in the hash index part and replaced the hash function with the MD5 crypto function.<br /><br />The NDB API is based on a very simple record access model that makes it possible to access individual rows, scan tables and scan using an ordered index. Most relational databases have a similar functional split in their software. Since my research into requirements on telecom databases showed that almost all queries are very simple queries that are part of the traffic protocols it seemed like a very good idea to make this interface visible to the application developers. Also research into other application areas such as genealogy, email servers and charging applications showed similar needs.<br /><br />Today MySQL Cluster still benefits from this record level API that makes it easy to integrate MySQL Cluster also for big data applications. It has also made it easy to make other types of interfaces to the data nodes such as LDAP interface and Java interfaces and so forth.<br /><br />Eventually I wrote an email to the Ericsson CEO, the email was focused on the use of NDB for a web cache server that we prototyped together with the Ericsson IT department. The email was sent back to my organisation which quickly ignored it, but the CEO also sent the email on to a new Ericsson organisation, Ericsson Business Development. I met with one of the key people in this organisation, Gunnar Tyrsing, whom I got to know when we both participated in a Ph.D course on data communication. He had done a fast career in developing the Japanese 2G mobile system. He was therefore a manager that understood both technology and management and he quickly understood the possibilities of NDB. He forwarded the assignment to work with me to Ton Keppel who became the manager of NDB development the next 3 years.<br /><br />Together with Ton Keppel I built up a new NDB organisation and we hired a lot of people 2000-2002, many of those are still working at MySQL, some of them in MySQL Cluster development but also a few in management positions. One of the first things we did was to convert the NDB code into a C++ program.<br /><br />Those days were interesting, but very hectic, I even had my own personal secretary for a period when I had meetings all the time, developer meetings, management meetings, meetings with our owner Ericsson Business Innovation, meetings with potential customers and many, many meetings with potential investors. I participated in a course in 2000 on Innovation in a large organisation where I learned a lot about marketing and we visited a number of VCs in the US. While visiting one of these VCs in april 2001 I remember him stating that 2 weeks previously the market for business to business web sites had imploded. This was the first sign of the IT crash I saw. Half a year later the problems came to us. In 2000 we had access to an almost unlimited budget and at the end of 2001 we started working with a more normal and constrained budget. At this time the number of ventures was decreased from 30 to 5 in half a year. So every week a new venture was closed so we all knew that our venture could be closed at any time. Somehow we managed to survive and we were one of the 5 remaining ventures that was left after downsizing completed.<br /><br />We refocused our efforts towards the telecom market after the IT crash, our first target market was the stock exchange market which wasn't a bright market after the stock market going for the worse. This meant that we finalised all the work on node recovery and system recovery that was started in 1998-1999. We found a first telecom customer in Bredbandsbolaget and they developed a number of their key network applications using MySQL Cluster which later many other customers have replicated.<br /><br />At this time in history all telecom vendors were bleeding and downsizing. Ericsson downsized from 110.000 employees to around 47.000 employees in a two-year period. So eventually the turn came also to Ericsson Business Innovation. All remaining ventures including us had to start searching for new owners. Actually the quality of the ventures was at this point very high since all of them managed to find new owners in just a few summer months in 2003.<br /><br />So the 2 september 2003 the acquisition of NDB into MySQL was completed and the NDB team was now part of the MySQL team. Our team came into MySQL at a very early point and increased the number of employees in MySQL significantly at the time.<br /><br />Our team continued working with existing customers and we also started on integrating the NDB Cluster storage engine into MySQL. We decided to call the combined MySQL and NDB product MySQL Cluster and this name is what we still use.<br /><br />After less than a year of working at MySQL the VP of Engineering Maurizio Gianola approached me and he had decided that I should work on new assignments. This happened exactly at the time when the commercial success of MySQL Cluster started to happen. Obviously after working on a project for more than 10 years it was hard to all of a sudden to start working on a new project. Interestingly I think it was good for me as a person to do this shift. What happened was that NDB was ready for success and needed a lot of detailed work on bugs, support, sales and new features for the customers. I have always been an innovator and therefore moving into a new project meant that I could innovate something new.<br /><br />The new project I got involved in was MySQL partitioning. At first I had to learn the MySQL Server inside out and in particular I had to learn the MySQL parser which was far away from my expertise areas. I had great help of Anthony Curtis in this time and I spent about one year developing the code and one year fixing the bugs before it was released as part of MySQL 5.1. I had seriously good help in the QA part of this project where Matthias Leich helped me writing me many new test programs that exercised the new partitioning code. Also Peter Gulutzan had a special genius of finding out how to write test cases that found bugs. When I saw his test cases I quickly concluded that he had a lot of imagination of how to use SQL.<br /><br />Working with MySQL code improved my skills as a programmer. In the Ericsson environment I learned to work on an architecturial level. At Ericsson I developed mind models that I finally "dumped" into source code. At MySQL I learned more about the actual coding skills.<br /><br />At this point in time I decided to make something revolutionary in my life, I resigned from MySQL and started working as an independent consultant. I always want to have a feeling that things are moving upwards and at this point in my life I didn't get this feeling. So I decided to be a bit revolutionary and take some risks. I had a large family with 5 kids at the time and financially it was a bit of an adventure. It did however work out very well. I still continued to dabble with MySQL development as a consultant part-time, but I also worked with other companies. I worked a lot with a norwegian company, Dolphin, that I helped develop marketing material for their network cards that could be used in combination with MySQL Cluster. I also worked as a MySQL consultant in the Stockholm area, I even developed a completely brand new 3-day MySQL course in 12 days, I produced 300 new slides in a short time. It was a fun time and the company went well and I booked around 45 consultancy hours per week so financially I came out quite ok.<br /><br />As part of this company I also started developing my own hobby project, iClaustron, I am still developing it. It's mainly an educational project for me, but eventually I might release the code, after 7 years I produced around 60.000 lines of code and it starts to actually do something useful :).<br /><br />Meanwhile MySQL had found a new VP of Engineering in Jeffrey Pugh and he was looking for a Senior MySQL Architect. He gave me an offering I could not refuse, it both meant that I returned to having a feeling of going upwards in my career and also financially ok. Initially I worked mostly on getting a lot of rock stars to communicate. We had a number of strong outspoken architects in the organisation, many of which were very well-known in the MySQL world, we also had a number of competent, but less outspoken architects. So my work was to try to get these people to get to an agreement on techical development which wasn't always so easy. We did however manage to shield off the developers from the technical debates and ensure that instead of debating each new feature in a large group, we allowed the developers to work with one or two architects in developing the new features. This has paid off well now in that our developers are much more independent in the current development organisation.<br /><br />At the end of 2008 it became clear that MySQL was in great need of a scalability project, at this time we were part of Sun after being acquired early 2008 and we had a skilled Sun team assisting us in this project. Given my background in performance-oriented design I dedicated much of my time over the next two years to this project. We delivered a breakthrough scalability project about once per year at the MySQL conference. The first one in 2009 we also got word of the Oracle acquisition. Personally I met a person coming out of the elevator at 7am coming to breakfast who asked how I felt about being acquired by Oracle. We have continued on this trend of delivering new scalability enhancements all the way until now when MySQL 5.6 was released with substantial performance enhancements and we've come a really long way on this path since we started this development almost 5 years ago.<br /><br />In the meantime I also worked with Kelly Long to develop the MySQL Thread Pool design. There was a previous design in the MySQL 6.0 project, this design didn't scale and we opted for a completely new design based on splitting connections into thread groups. Kelly Long left MySQL to do a new startup in the networked storage business and this week I read how he sold his new venture for 119M$, so working with MySQL means working with many talented people. The thread pool design was recently updated for MySQL 5.6 and its design rocks also at a very much higher throughput.<br /><br />The last few years have seen a lot of tremendous performance improvements in various areas. Much of the scalability improvements now happen as part of the normal engineering process and I mainly focus on helping out in small directed projects. So I helped out with the split of the LOCK_open mutex and the increased scalability of the binlog group commit writes and resolving the bottleneck in InnoDB we called G5 which essentially was a 1-liner problem.<br /><br />Other areas I have focused my attention on has been back to MySQL Cluster, in MySQL Cluster 7.2 we increased scalability of MySQL Cluster by almost 10x through adding possibilities for multiple send threads, multiple receive threads, multiple TC threads and scaling to even more local database threads (LDM threads). In MySQL Cluster 7.3 I just completed a much improved scalability of the NDB API.<br /><br />For me the last few years have been interesting, I have had some tough health issues, but at the same time the efforts we have done have paid off in ways never seen before. We've increased performance of the MySQL Server by 3.3x, we've increased performance of MySQL Cluster by almost 10x, we've demonstrated 1 billion updates per minute in MySQL Cluster and we're ready to scale MySQL Cluster 7.3 to hundreds of millions reads per second.<br /><br />I tend to call the things I've done the last few years surgery. I go into working code, find the hot-spots and find ways to remove these hot-spots. The patches to do this is usually very small but one needs to be very careful in the changes since they touch parts of the code that are extremely central. As with real surgery the impact of these surgical patches can be astounding.<br /><br />So where does the future take us, well there are still many interesting things to further develop. Every time we put some effort into parallelising some part of the MySQL code we can expect at least a 10x speedup. There is possibilities to speed up local code in most areas, there is possibilities to use the dramatic surge of CPU power to use compression even for main memory data. There is lots of tools that we can build around MySQL that provides more scalability, more high availability. We also know that the HW industry is innovating and they are likely to put things on our table that enables new things we never dreamed of doing before. One thing I particularly look forward to is when the HW industry can replace hard drives by something similar to DRAM's that have a persistent memory. When this happens it can change a lot of things we currently take for granted.<br /><br />I found in my career that as an innovator it's important to be ready to let go of your development and put it into other people's competent hands. This means that one can move on to new areas. If one continues to work in the same organisation one can then always return to the old work areas. So I still do a lot of work in MySQL Cluster, I still review work done on MySQL partitioning, I still participate in working on the MySQL thread pool, I still help out on various MySQL scalability projects and there is even some new projects yet to be released where I continue in the review role after helping out in the early phases.<br /><br />I did however leave one project solely to myself and this is the iClaustron project. It's nice to be able to work on something completely without regard to any other person's view and do exactly as I please. It's refreshing to do this every now and then and for me it has served as a very important tool to keep me up-to-date on build tools, code organisation, modularisation of code and many other aspects of software engineering.</div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59653&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59653&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 15 May 2013 12:10:00 +0000</pubDate>
    <dc:creator>Mikael Ronstr&amp;ouml;m</dc:creator>
  </item>

  <item>
    <title>Announcing Percona XtraBackup 2.1.1 GA</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15369</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/15/announcing-percona-xtrabackup-2-1-0-ga/</link>
    <description> Percona is glad to announce the release of Percona XtraBackup 2.1.1 on May 15th 2013. Downloads are available from our download site here and Percona Software Repositories.Percona XtraBackup enables backups without blocking user queries, making it ideal for companies with large data sets and mission-critical applications that cannot tolerate long periods of downtime. Offered free as an open source solution, XtraBackup drives down backup costs while providing unique features for MySQL backup. The new 2.1.1 GA version offers improved performance, enterprise-grade security, and lower resource usage.This release is the first GA (Generally Available) stable release in the 2.1 series.New Features:Percona XtraBackup now has support for Compact Backups. This feature can be used for taking the backups that will take less amount of disk space. GA release now contains new innobackupex &amp;#8211;rebuild-threads option that can be used to specify the number of threads started by XtraBackup when rebuilding secondary indexes on innobackupex --apply-log --rebuild-indexes. This allows parallel processing of individual tables when rebuilding the index.Percona XtraBackup has implemented Encrypted Backups. This feature can be used to encrypt/decrypt both local and streamed backups in order to add another layer of protection to the backups.innobackupex now uses Perl&amp;#8217;s DBD::MySQL package for server communication instead of spawning the MySQL command line client.Support for InnoDB 5.0 and InnoDB 5.1 builtin has been removed from Percona XtraBackup.After being deprecated in previous version, option --remote-host has been completely removed in Percona XtraBackup 2.1.Percona XtraBackup can use XtraDB changed page tracking feature to perform the Incremental Backups now.Bugs Fixed:innobackupex is using SHOW MASTER STATUS to obtain binlog file and position. This could trigger a bug if the server being backed up was standalone server (neither master nor slave in replication) and binlog information wasn&amp;#8217;t available. Fixed by not creating xtrabackup_binlog_info file when binlog isn&amp;#8217;t available. Bug fixed #1168513.Percona XtraBackup would leave xbtemp temp files behind due to a typo. Bug fixed #1172016.Percona XtraBackup would assume the table has been dropped if the tablespace was renamed after it was scanned by XtraBackup on startup and before XtraBackup attempted to copy it. Bug fixed #1079700.Orphaned xtrabackup_pid file left inside tmpdir could cause SST to fail. Fixed by fix checking if xtrabackup_pid file exists once innobackupex starts, and try to remove it or fail if it cannot be removed. Bug fixed #1175860.xtrabackup &amp;#8211;stats option would not work with server datadir if the server isn&amp;#8217;t running and logs were in a separate directory. Bug fixed #1174314.Other bugs fixed: bug fixed #1166713, bug fixed #1175581, bug fixed #1175318, bug fixed #1175309, bug fixed #1176198, bug fixed #1175566.Release notes with all the bugfixes for Percona XtraBackup 2.1.1 are available in our online documentation. Bugs can be reported on the launchpad bug tracker.The post Announcing Percona XtraBackup 2.1.1 GA appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/01/Percona_XtraBackup.jpg"><img class="alignleft size-full wp-image-12668" alt="Percona XtraBackup for MySQL" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/01/Percona_XtraBackup.jpg" width="229" height="87" /></a> <em>Percona</em> is glad to announce the release of <em>Percona XtraBackup</em> 2.1.1 on May 15th 2013. Downloads are available from our download site <a href="http://www.percona.com/downloads/XtraBackup/XtraBackup-2.1.1/">here</a> and <a href="http://www.percona.com/doc/percona-xtrabackup/2.1/installation.html">Percona Software Repositories</a>.</p><p><em><a href="http://www.percona.com/software/percona-xtrabackup">Percona XtraBackup</a></em> enables backups without blocking user queries, making it ideal for companies with large data sets and mission-critical applications that cannot tolerate long periods of downtime. Offered free as an open source solution, <em>XtraBackup</em> drives down backup costs while providing unique features for <em>MySQL</em> backup. The new 2.1.1 GA version offers improved performance, enterprise-grade security, and lower resource usage.</p><p>This release is the first GA (Generally Available) stable release in the 2.1 series.</p><p><strong>New Features:</strong></p><ul><li><em>Percona XtraBackup</em> now has support for <a href="http://www.percona.com/doc/percona-xtrabackup/2.1/innobackupex/compact_backups_innobackupex.html#compact-backups-ibk">Compact Backups</a>. This feature can be used for taking the backups that will take less amount of disk space. <em>GA</em> release now contains new <a href="http://www.percona.com/doc/percona-xtrabackup/2.1/innobackupex/innobackupex_option_reference.html#cmdoption-innobackupex--rebuild-threads">innobackupex &#8211;rebuild-threads</a> option that can be used to specify the number of threads started by <em>XtraBackup</em> when rebuilding secondary indexes on <code>innobackupex --apply-log --rebuild-indexes</code>. This allows parallel processing of individual tables when rebuilding the index.</li><li><em>Percona XtraBackup</em> has implemented <a href="http://www.percona.com/doc/percona-xtrabackup/2.1/innobackupex/encrypted_backups_innobackupex.html#encrypted-backups-ibk">Encrypted Backups</a>. This feature can be used to encrypt/decrypt both local and streamed backups in order to add another layer of protection to the backups.</li><li><strong>innobackupex</strong> now uses Perl&#8217;s <code>DBD::MySQL</code> package for server communication instead of spawning the <em>MySQL</em> command line client.</li><li>Support for <em>InnoDB</em> 5.0 and <em>InnoDB</em> 5.1 builtin has been removed from <em>Percona XtraBackup</em>.</li><li>After being deprecated in previous version, option <code>--remote-host</code> has been completely removed in <em>Percona XtraBackup</em> 2.1.</li><li><em>Percona XtraBackup</em> can use <a href="http://www.percona.com/doc/percona-server/5.5/management/changed_page_tracking.html">XtraDB changed page tracking</a> feature to perform the <a href="http://www.percona.com/doc/percona-xtrabackup/2.1/xtrabackup_bin/incremental_backups.html#xb-incremental">Incremental Backups</a> now.</li></ul><p><strong>Bugs Fixed:</strong></p><ul><li><strong>innobackupex</strong> is using <code>SHOW MASTER STATUS</code> to obtain binlog file and position. This could trigger a bug if the server being backed up was standalone server (neither master nor slave in replication) and binlog information wasn&#8217;t available. Fixed by not creating <code>xtrabackup_binlog_info</code> file when binlog isn&#8217;t available. Bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1168513">#1168513</a>.</li><li><em>Percona XtraBackup</em> would leave <code>xbtemp</code> temp files behind due to a typo. Bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1172016">#1172016</a>.</li><li><em>Percona XtraBackup</em> would assume the table has been dropped if the tablespace was renamed after it was scanned by <em>XtraBackup</em> on startup and before <em>XtraBackup</em> attempted to copy it. Bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1079700">#1079700</a>.</li><li>Orphaned <code>xtrabackup_pid</code> file left inside tmpdir could cause <a href="http://www.percona.com/doc/percona-xtradb-cluster/manual/state_snapshot_transfer.html">SST</a> to fail. Fixed by fix checking if <code>xtrabackup_pid</code> file exists once <strong>innobackupex</strong> starts, and try to remove it or fail if it cannot be removed. Bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1175860">#1175860</a>.</li><li><a href="http://www.percona.com/doc/percona-xtrabackup/2.1/xtrabackup_bin/xbk_option_reference.html#cmdoption-xtrabackup--stats">xtrabackup &#8211;stats</a> option would not work with server datadir if the server isn&#8217;t running and logs were in a separate directory. Bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1174314">#1174314</a>.</li></ul><p>Other bugs fixed: bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1166713">#1166713</a>, bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1175581">#1175581</a>, bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1175318">#1175318</a>, bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1175309">#1175309</a>, bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1176198">#1176198</a>, bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1175566">#1175566</a>.</p><p>Release notes with all the bugfixes for <em>Percona XtraBackup</em> 2.1.1 are available in our <a href="http://www.percona.com/doc/percona-xtrabackup/release-notes/2.1/2.1.1.html">online documentation</a>. Bugs can be reported on the <a href="https://bugs.launchpad.net/percona-xtrabackup/+filebug">launchpad bug tracker</a>.</p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/15/announcing-percona-xtrabackup-2-1-0-ga/">Announcing Percona XtraBackup 2.1.1 GA</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59652&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59652&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 15 May 2013 12:00:47 +0000</pubDate>
    <dc:creator>MySQL Performance Blog</dc:creator>
    <category>MySQL</category>
    <category>Percona XtraBackup</category>
  </item>

  <item>
    <title>Upcoming EMEA Events with MySQL!</title>
    <guid isPermaLink="false">https://blogs.oracle.com/MySQL/entry/upcoming_emea_events_with_mysql</guid>
    <link>https://blogs.oracle.com/MySQL/entry/upcoming_emea_events_with_mysql</link>
    <description>MySQL Community team is pleased to announce following events as the ones supported by us with a great MySQL staff attending. Find more details below (or at our Community wikis).  
   
    NoSQL Roadshow, Berlin Germany, May 16, 2013 
     
      Talk: NoSQL &amp;amp; MySQL by Mario Beck 
     
    Solutions Libres &amp;amp; Open Source, Paris, France, May 28-29, 2013 
     
      Talk: NoSQL &amp;amp; MySQL by Olivier Zemrag 
      Meet MySQL, Oracle Linux and VM team at our booth E40 in the main exhibition hall! 
     
    International PHP Conference, Berlin, Germany, June 4-5, 2013 
     
      Talks: MySQL meets NoSQL &amp;amp; An auto-sharding Database Cluster in a Nutshell by Ulf Wendel; Write your own SAPI by Andrey Hristov 
      Meet us at our MySQL booth too! 
     
    DevConf 2013, Moscow, Russia, June 14-15, 2013 
     
      MySQL team has submitted about 5 talks, however the CfP is still open, so the accepted talks are not yet announced.  
      Lets meet our technical team at the MySQL booth!  
     
    OpenSUSE, Thessaloniki, Greece, July 18-22, 2013 
     
      You can find MySQL team at the MySQL booth as well as find several talks at openSUSE! 
     
    Froscon 2013, St. Augustin, Germany, August 24-25, 2013 
     
      Froscon is starting to be a tradition. Same as last year you can find our MySQL staff at the booth and also talking about MySQL news during the conference! 
     
    DrupalCon, Prague, Czech Republic, September 23-27, 2013 
     
      We are pleased to invite you to visit our MySQL booth as well as find several MySQL related talks we are planning to submit! 
     
   
  If you are interested, you can find the other conferences we are attending (above EMEA area) at our MySQL Community wikis. We are looking forward seeing and talking to you! 
   </description>
    <content:encoded><![CDATA[<p>MySQL Community team is pleased to announce following events as the ones supported by us with a great MySQL staff attending. Find more details below (or at our <a href="https://wikis.oracle.com/display/mysql/Upcoming+MySQL+Events">Community wikis</a>). </p> 
  <ul> 
    <li><a href="http://nosqlroadshow.com/nosql-berlin-2013/">NoSQL Roadshow</a>, Berlin Germany, May 16, 2013<br /></li> 
    <ul> 
      <li>Talk: <a href="http://nosqlroadshow.com/nosql-berlin-2013/presentation/MySQL%20and%20NoSQL%3A%20Best%20of%20both%20worlds">NoSQL &amp; MySQL</a> by Mario Beck</li> 
    </ul> 
    <li><a href="http://www.solutionslinux.fr/">Solutions Libres &amp; Open Source</a>, Paris, France, May 28-29, 2013</li> 
    <ul> 
      <li>Talk: <a href="http://www.solutionslinux.fr/preinscription-conferences.html?step=0">NoSQL &amp; MySQL</a> by Olivier Zemrag</li> 
      <li>Meet MySQL, Oracle Linux and VM team at our booth E40 in the main exhibition hall!<br /></li> 
    </ul> 
    <li><a href="http://phpconference.com/overview">International PHP Conference</a>, Berlin, Germany, June 4-5, 2013</li> 
    <ul> 
      <li>Talks: <a href="http://phpconference.com/sessions/mysql-meets-nosql">MySQL meets NoSQL</a> &amp; <a href="http://phpconference.com/sessions/auto-sharding-database-cluster-nutshell">An auto-sharding Database Cluster in a Nutshell</a> by Ulf Wendel; <a href="http://phpconference.com/node/594">Write your own SAPI</a> by Andrey Hristov</li> 
      <li>Meet us at our MySQL booth too!<br /></li> 
    </ul> 
    <li><a href="http://devconf.ru/">DevConf 2013</a>, Moscow, Russia, June 14-15, 2013</li> 
    <ul> 
      <li>MySQL team has submitted about 5 talks, however the CfP is still open, so the accepted talks are not yet announced. <br /></li> 
      <li>Lets meet our technical team at the MySQL booth! <br /></li> 
    </ul> 
    <li><a href="http://conference.opensuse.org/">OpenSUSE</a>, Thessaloniki, Greece, July 18-22, 2013</li> 
    <ul> 
      <li>You can find MySQL team at the MySQL booth as well as find several talks at openSUSE!<br /></li> 
    </ul> 
    <li><a href="http://www.froscon.de/startseite/">Froscon 2013</a>, St. Augustin, Germany, August 24-25, 2013</li> 
    <ul> 
      <li>Froscon is starting to be a tradition. Same as last year you can find our MySQL staff at the booth and also talking about MySQL news during the conference!<br /></li> 
    </ul> 
    <li><a href="http://prague2013.drupal.org/">DrupalCon</a>, Prague, Czech Republic, September 23-27, 2013</li> 
    <ul> 
      <li>We are pleased to invite you to visit our MySQL booth as well as find several MySQL related talks we are planning to submit!</li> 
    </ul> 
  </ul> 
  <p>If you are interested, you can find the other conferences we are attending (above EMEA area) at our MySQL <a href="https://wikis.oracle.com/display/mysql/Upcoming+MySQL+Events">Community wikis</a>. We are looking forward seeing and talking to you!<br /></p> 
  <ul> </ul><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59651&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59651&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 15 May 2013 11:00:26 +0000</pubDate>
    <dc:creator>Oracle MySQL Group</dc:creator>
    <category>Community</category>
    <category>community</category>
    <category>conference</category>
    <category>event</category>
    <category>mysql</category>
  </item>

  <item>
    <title>Calculating the InnoDB free space</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-1135944569112521190.post-3758057481665619710</guid>
    <link>http://databaseblog.myname.nl/2013/05/calculating-innodb-free-space.html</link>
    <description>Recently someone asked my if it's possible to find the total free space within InnoDB. I thought this would be very easy as the INFORMATION_SCHEMA.TABLES table has a DATA_FREE column. So we could just use SELECT SUM(DATA_FREE) FROM INFORMATION_SCHEMA.TABLES couldn't we?&amp;nbsp So what does the DATA_FREE column tell us? It tells us the free data within InnoDB for that particular table. A table can share a tablespace with multiple other tables.&amp;nbsp The tablespace which is used by a table depends on whether the innodb_file_per_table was enabled during table creation and/or at the last time the table was rebuild (e.g. by OPTIMIZE TABLE).&amp;nbsp If innodb_file_per_table was always disabled then this query probably reports the correct free space:SELECT DATA_FREE FROM INFORMATION_SCHEMA.TABLES WHERE ENGINE='InnoDB' LIMIT 1;This is because all tables will share 1 tablespace.&amp;nbsp If innodb_file_per_table was always enabled (new default for 5.6!) then this would report the free space:SELECT SUM(DATA_FREE) FROM INFORMATION_SCHEMA.TABLES WHERE ENGINE='InnoDB';This is because eache table will have it's own tablespace.&amp;nbsp But how could we combine these two?&amp;nbsp To give this a try I create a MySQL 5.6.10 sandbox with 4 tables of which only 2 have their own tablespace.&amp;nbsp My first try is to use my udf_fileexists UDF:&amp;nbspmysql&gt; SELECT TABLE_NAME,DATA_FREE,    -&gt; udf_fileexists(CONCAT(TABLE_SCHEMA,'/',TABLE_NAME,'.ibd')) AS ibd_file     -&gt; FROM information_schema.tables WHERE ENGINE='InnoDB';+----------------------+-----------+----------+| TABLE_NAME           | DATA_FREE | ibd_file |+----------------------+-----------+----------+| t1                   |   4194304 |        1 || t2                   |   4194304 |        1 || t3                   |  66060288 |        0 || t4                   |  66060288 |        0 || innodb_index_stats   |         0 |        1 || innodb_table_stats   |         0 |        1 || slave_master_info    |         0 |        1 || slave_relay_log_info |         0 |        1 || slave_worker_info    |         0 |        1 |+----------------------+-----------+----------+9 rows in set (0.02 sec)mysql&gt; SELECT (SELECT DATA_FREE FROM INFORMATION_SCHEMA.TABLES WHERE     -&gt; NOT udf_fileexists(CONCAT(TABLE_SCHEMA,'/',TABLE_NAME,'.ibd'))     -&gt; AND ENGINE='InnoDB' LIMIT 1) + (SELECT SUM(DATA_FREE)     -&gt; FROM INFORMATION_SCHEMA.TABLES WHERE     -&gt; udf_fileexists(CONCAT(TABLE_SCHEMA,'/',TABLE_NAME,'.ibd'))     -&gt; AND ENGINE='InnoDB') AS TOTAL_DATA_FREE;+-----------------+| TOTAL_DATA_FREE |+-----------------+|        74448896 |+-----------------+1 row in set (0.03 sec)&amp;nbspSo that works, but it requires loading a UDF. Luckily it's also possible to only use INFORMATION_SCHEMA by using the INNODB_SYS_TABLES table. This works only for 5.6 and newer.&amp;nbsp mysql&gt; SELECT T.TABLE_SCHEMA,T.TABLE_NAME,T.DATA_FREE,ST.SPACE,SD.PATH     -&gt; FROM INFORMATION_SCHEMA.TABLES T LEFT JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES ST     -&gt; ON ST.NAME=CONCAT(T.TABLE_SCHEMA,'/',T.TABLE_NAME)     -&gt; LEFT JOIN INFORMATION_SCHEMA.INNODB_SYS_DATAFILES SD ON SD.SPACE=ST.SPACE WHERE T.ENGINE='InnoDB';+---------------------+----------------------+-----------+-------+----------------------------------+| TABLE_SCHEMA        | TABLE_NAME           | DATA_FREE | SPACE | PATH                             |+---------------------+----------------------+-----------+-------+----------------------------------+| mysql               | innodb_table_stats   |         0 |     1 | ./mysql/innodb_table_stats.ibd   || mysql               | innodb_index_stats   |         0 |     2 | ./mysql/innodb_index_stats.ibd   || mysql               | slave_relay_log_info |         0 |     3 | ./mysql/slave_relay_log_info.ibd || mysql               | slave_master_info    |         0 |     4 | ./mysql/slave_master_info.ibd    || mysql               | slave_worker_info    |         0 |     5 | ./mysql/slave_worker_info.ibd    || innodbfreespacetest | t1                   |   4194304 |     6 | ./innodbfreespacetest/t1.ibd     || innodbfreespacetest | t2                   |   4194304 |     7 | ./innodbfreespacetest/t2.ibd     || innodbfreespacetest | t3                   |  66060288 |     0 | NULL                             || innodbfreespacetest | t4                   |  66060288 |     0 | NULL                             |+---------------------+----------------------+-----------+-------+----------------------------------+9 rows in set (0.02 sec)mysql&gt; SELECT (SELECT SUM(DATA_FREE) FROM INFORMATION_SCHEMA.TABLES T     -&gt; LEFT JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES ST ON     -&gt; ST.NAME=CONCAT(T.TABLE_SCHEMA,'/',T.TABLE_NAME) WHERE SPACE0) +     -&gt; (SELECT DATA_FREE FROM INFORMATION_SCHEMA.TABLES T     -&gt; LEFT JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES ST     -&gt; ON ST.NAME=CONCAT(T.TABLE_SCHEMA,'/',T.TABLE_NAME)     -&gt; WHERE SPACE=0 LIMIT 1) AS INNODB_FREE_GLOBAL;+--------------------+| INNODB_FREE_GLOBAL |+--------------------+|           74448896 |+--------------------+1 row in set (0.04 sec) Calculating the free space can be useful if you don't have autoextend enabled on your datafiles (requires innodb_file_per_table to be disabled). It can also be useful to calculate how much space could be freed by running OPTIMIZE TABLE (requires innodb_file_per_table to be enabled).&amp;nbsp; Conclusion:If you're on 5.6 you can use INFORMATION_SCHEMA and for 5.5 and earlier you have to use a UDF or have (a script) to peek in the MySQL datadir.</description>
    <content:encoded><![CDATA[Recently someone asked my if it's possible to find the total free space within InnoDB. I thought this would be very easy as the INFORMATION_SCHEMA.TABLES table has a DATA_FREE column. So we could just use SELECT SUM(DATA_FREE) FROM INFORMATION_SCHEMA.TABLES couldn't we?<br>&nbsp<br> So what does the DATA_FREE column tell us? It tells us the free data within InnoDB for that particular table. A table can share a tablespace with multiple other tables.<br>&nbsp<br> The tablespace which is used by a table depends on whether the innodb_file_per_table was enabled during table creation and/or at the last time the table was rebuild (e.g. by OPTIMIZE TABLE).<br>&nbsp<br> If innodb_file_per_table was always disabled then this query probably reports the correct free space:<br><pre>SELECT DATA_FREE FROM INFORMATION_SCHEMA.TABLES WHERE ENGINE='InnoDB' LIMIT 1;</pre><br>This is because all tables will share 1 tablespace.<br>&nbsp<br> If innodb_file_per_table was always enabled (new default for 5.6!) then this would report the free space:<br><pre>SELECT SUM(DATA_FREE) FROM INFORMATION_SCHEMA.TABLES WHERE ENGINE='InnoDB';</pre><br>This is because eache table will have it's own tablespace.<br>&nbsp<br> But how could we combine these two?<br>&nbsp<br> To give this a try I create a MySQL 5.6.10 sandbox with 4 tables of which only 2 have their own tablespace.<br>&nbsp<br> My first try is to use <a href="https://github.com/dveeden/udf_fileexists">my udf_fileexists UDF</a>:<br>&nbsp<br><pre><br />mysql> SELECT TABLE_NAME,DATA_FREE,<br />    -> udf_fileexists(CONCAT(TABLE_SCHEMA,'/',TABLE_NAME,'.ibd')) AS ibd_file <br />    -> FROM information_schema.tables WHERE ENGINE='InnoDB';<br />+----------------------+-----------+----------+<br />| TABLE_NAME           | DATA_FREE | ibd_file |<br />+----------------------+-----------+----------+<br />| t1                   |   4194304 |        1 |<br />| t2                   |   4194304 |        1 |<br />| t3                   |  66060288 |        0 |<br />| t4                   |  66060288 |        0 |<br />| innodb_index_stats   |         0 |        1 |<br />| innodb_table_stats   |         0 |        1 |<br />| slave_master_info    |         0 |        1 |<br />| slave_relay_log_info |         0 |        1 |<br />| slave_worker_info    |         0 |        1 |<br />+----------------------+-----------+----------+<br />9 rows in set (0.02 sec)<br /><br />mysql> SELECT (SELECT DATA_FREE FROM INFORMATION_SCHEMA.TABLES WHERE <br />    -> NOT udf_fileexists(CONCAT(TABLE_SCHEMA,'/',TABLE_NAME,'.ibd')) <br />    -> AND ENGINE='InnoDB' LIMIT 1) + (SELECT SUM(DATA_FREE) <br />    -> FROM INFORMATION_SCHEMA.TABLES WHERE <br />    -> udf_fileexists(CONCAT(TABLE_SCHEMA,'/',TABLE_NAME,'.ibd')) <br />    -> AND ENGINE='InnoDB') AS TOTAL_DATA_FREE;<br />+-----------------+<br />| TOTAL_DATA_FREE |<br />+-----------------+<br />|        74448896 |<br />+-----------------+<br />1 row in set (0.03 sec)<br /></pre><br>&nbsp<br>So that works, but it requires loading a UDF. Luckily it's also possible to only use INFORMATION_SCHEMA by using the <a href="http://dev.mysql.com/doc/refman/5.6/en/innodb-sys-tables-table.html">INNODB_SYS_TABLES</a> table. This works only for 5.6 and newer.<br>&nbsp<br> <pre><br />mysql> SELECT T.TABLE_SCHEMA,T.TABLE_NAME,T.DATA_FREE,ST.SPACE,SD.PATH <br />    -> FROM INFORMATION_SCHEMA.TABLES T LEFT JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES ST <br />    -> ON ST.NAME=CONCAT(T.TABLE_SCHEMA,'/',T.TABLE_NAME) <br />    -> LEFT JOIN INFORMATION_SCHEMA.INNODB_SYS_DATAFILES SD ON SD.SPACE=ST.SPACE WHERE T.ENGINE='InnoDB';<br />+---------------------+----------------------+-----------+-------+----------------------------------+<br />| TABLE_SCHEMA        | TABLE_NAME           | DATA_FREE | SPACE | PATH                             |<br />+---------------------+----------------------+-----------+-------+----------------------------------+<br />| mysql               | innodb_table_stats   |         0 |     1 | ./mysql/innodb_table_stats.ibd   |<br />| mysql               | innodb_index_stats   |         0 |     2 | ./mysql/innodb_index_stats.ibd   |<br />| mysql               | slave_relay_log_info |         0 |     3 | ./mysql/slave_relay_log_info.ibd |<br />| mysql               | slave_master_info    |         0 |     4 | ./mysql/slave_master_info.ibd    |<br />| mysql               | slave_worker_info    |         0 |     5 | ./mysql/slave_worker_info.ibd    |<br />| innodbfreespacetest | t1                   |   4194304 |     6 | ./innodbfreespacetest/t1.ibd     |<br />| innodbfreespacetest | t2                   |   4194304 |     7 | ./innodbfreespacetest/t2.ibd     |<br />| innodbfreespacetest | t3                   |  66060288 |     0 | NULL                             |<br />| innodbfreespacetest | t4                   |  66060288 |     0 | NULL                             |<br />+---------------------+----------------------+-----------+-------+----------------------------------+<br />9 rows in set (0.02 sec)<br /><br />mysql> SELECT (SELECT SUM(DATA_FREE) FROM INFORMATION_SCHEMA.TABLES T <br />    -> LEFT JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES ST ON <br />    -> ST.NAME=CONCAT(T.TABLE_SCHEMA,'/',T.TABLE_NAME) WHERE SPACE<>0) + <br />    -> (SELECT DATA_FREE FROM INFORMATION_SCHEMA.TABLES T <br />    -> LEFT JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES ST <br />    -> ON ST.NAME=CONCAT(T.TABLE_SCHEMA,'/',T.TABLE_NAME) <br />    -> WHERE SPACE=0 LIMIT 1) AS INNODB_FREE_GLOBAL;<br />+--------------------+<br />| INNODB_FREE_GLOBAL |<br />+--------------------+<br />|           74448896 |<br />+--------------------+<br />1 row in set (0.04 sec)<br /></pre> Calculating the free space can be useful if you don't have autoextend enabled on your datafiles (requires innodb_file_per_table to be disabled). It can also be useful to calculate how much space could be freed by running OPTIMIZE TABLE (requires innodb_file_per_table to be enabled).<br>&nbsp;<br> Conclusion:<br>If you're on 5.6 you can use INFORMATION_SCHEMA and for 5.5 and earlier you have to use a UDF or have (a script) to peek in the MySQL datadir.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59650&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59650&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 15 May 2013 06:28:00 +0000</pubDate>
    <dc:creator>Daniel van Eeden</dc:creator>
    <category>mysql</category>
    <category>DATA_FREE</category>
    <category>innodb</category>
    <category>information_schema</category>
  </item>

  <item>
    <title>How to get from MySQL SQL to C</title>
    <guid isPermaLink="false">http://ebergen.net/wordpress/?p=632</guid>
    <link>http://ebergen.net/wordpress/2013/05/14/how-to-get-from-mysql-sql-to-c/</link>
    <description>Occasionally it is useful to know what a MySQL command is doing internally. Just looking into the MySQL source directory can be overwhelming. Knowing the basics of the handler interface and the sql parser can be a great start for reading the source code to understand what MySQL does under the hood. Here I will cover a little bit about how the SQL syntax is defined.
Everything starts with lex.h and sql_yacc.yy in the sql/ dir. lex.h contains all the functions and symbols used to make up the SQL syntax. The sql_yacc.yy file describes the relationships between these symbols and the C functions responsible for executing them. I&amp;#8217;m not sure why some symbol definitions end in _SYM and others don&amp;#8217;t. Looking in lex.h &amp;#8220;FLUSH&amp;#8221; is defined as FLUSH_SYM. To see all the places where flush is allowed in the SQL go back to sql_yacc.yy and grep for it.
The first important section looks like this:
/* flush things */                                                                      

flush:                                                                                  
          FLUSH_SYM opt_no_write_to_binlog                                              
          {                                                                             
            LEX *lex=Lex;                                                               
            lex-&amp;gt;sql_command= SQLCOM_FLUSH;                                             
            lex-&amp;gt;type= 0;                                                               
            lex-&amp;gt;no_write_to_binlog= $2;                                                
          }                                                                             
          flush_options                                                                 
          {}                                                                            
        ;
This is where things can get a bit nested and weird. The flush: section is saying that flush can have opt_no_write_to_binlog optionally after it. The first section in curly braces defines the sql command and also sets the flag no_write_to_binlog. SQLCOM_FLUSH is important in the next phase where we get into actual C code.
flush_options used to define all of the possible options for a flush command. Going one step further down flush_options_list basically says that a flush command can contain more than one option.
flush_options_list:
          flush_options_list ',' flush_option
        | flush_option
          {}
        ;
Notice that flush_options_list can contain a flush_options_list. I don&amp;#8217;t know the specifics of this but it is the yacc way of saying things can be repeated. In this case the | is saying that there can be multiple flush_option separated by a comma or just one option.
With flush_option: things start to make more sense. This is all of the different types of flush commands. Looking at the first part
flush_option:
          ERROR_SYM LOGS_SYM
          { Lex-&amp;gt;type|= REFRESH_ERROR_LOG; }
        | ENGINE_SYM LOGS_SYM
          { Lex-&amp;gt;type|= REFRESH_ENGINE_LOG; }
        | GENERAL LOGS_SYM
          { Lex-&amp;gt;type|= REFRESH_GENERAL_LOG; }
        | SLOW LOGS_SYM
Reading it in english this is basically saying  &amp;#8221;Error logs OR engine logs OR general logs OR slow logs&amp;#8221; Combining this with the previous section allowing multiple flush options this is a valid query:

MariaDB [test]&amp;gt; flush error logs, slow logs;
Query OK, 0 rows affected (0.00 sec)

The flush command is quite a bit improved in MariaDB 10. Comparing this to part of the flush_option: section from MariaDB 5.2 shows how much it has improved:

flush_option:
          table_or_tables
          { Lex-&gt;type|= REFRESH_TABLES; }
          opt_table_list {}
        | TABLES WITH READ_SYM LOCK_SYM
          { Lex-&gt;type|= REFRESH_TABLES | REFRESH_READ_LOCK; }
        | QUERY_SYM CACHE_SYM
          { Lex-&gt;type|= REFRESH_QUERY_CACHE_FREE; }
        | HOSTS_SYM
          { Lex-&gt;type|= REFRESH_HOSTS; }
        | PRIVILEGES
          { Lex-&gt;type|= REFRESH_GRANT; }
        | LOGS_SYM
          { Lex-&gt;type|= REFRESH_LOG; }
        | STATUS_SYM
          { Lex-&gt;type|= REFRESH_STATUS; }

In 5.2 the LOGS_SYM is alone which makes flush error logs an invalid query. By scanning the grammar in sql_yacc.yy it is easy to see which syntax is and isn&amp;#8217;t supported between versions.
Now that a command of SQLCOM_FLUSH has been specified. The flush_option is passed in via Lex-&gt;type. Each option is bitwise ORed into type. It is time to switch over to C++ code and see how these are executed.
sql_parse.cc has a huge switch case statement that contains every possible command type that MySQL can process. For this example look for case SQLCOM_FLUSH: The SQLCOM_FLUSH is the same option from the grammar file. There is basically one important function under this section reload_acl_and_cache(). 
In newer versions reload_acl_and_cache() is in sql_reload.cc. In older versions it is in sql_parse.cc This function basically checks each type of thing that can be flushed one by one to see if their flag has been ORed into Lex-type which is options here. It then calls the C++ code responsible for carrying out the flushing of that type of object.
Other types of calls can be traced the same way. Most of the token names can be easily grepped from sql_yacc.yy. Most of the show commands are handled similar to flush except when it gets into C++ code they are mapped into a special pair of arrays that tell MySQL how to generate a INFORMATION_SCHEMA table. 
For the show commands the C++ code is in the sql_yacc.yy file as a call to prepare_schema_table(). There are two arrays that are important when adding a new table. In MariaDB 10 the first is enum_schema_tables in handler.cc. In older versions this array is in table.h. The other array is ST_SCHEMA_TABLE schema_tables in sql_show.cc. 
schema_tables has the important information. Among other things it holds the text name of the table, the fields used to make it, and the function called to generate the data in the table. The fields list usually ends with _fields_info and the function used to create the result set used for the table starts with fill_.</description>
    <content:encoded><![CDATA[<p>Occasionally it is useful to know what a MySQL command is doing internally. Just looking into the MySQL source directory can be overwhelming. Knowing the basics of the handler interface and the sql parser can be a great start for reading the source code to understand what MySQL does under the hood. Here I will cover a little bit about how the SQL syntax is defined.</p>
<p>Everything starts with lex.h and sql_yacc.yy in the sql/ dir. lex.h contains all the functions and symbols used to make up the SQL syntax. The sql_yacc.yy file describes the relationships between these symbols and the C functions responsible for executing them. I&#8217;m not sure why some symbol definitions end in _SYM and others don&#8217;t. Looking in lex.h &#8220;FLUSH&#8221; is defined as FLUSH_SYM. To see all the places where flush is allowed in the SQL go back to sql_yacc.yy and grep for it.</p>
<p>The first important section looks like this:</p>
<pre>/* flush things */                                                                      

flush:                                                                                  
          FLUSH_SYM opt_no_write_to_binlog                                              
          {                                                                             
            LEX *lex=Lex;                                                               
            lex-&gt;sql_command= SQLCOM_FLUSH;                                             
            lex-&gt;type= 0;                                                               
            lex-&gt;no_write_to_binlog= $2;                                                
          }                                                                             
          flush_options                                                                 
          {}                                                                            
        ;</pre>
<p>This is where things can get a bit nested and weird. The flush: section is saying that flush can have opt_no_write_to_binlog optionally after it. The first section in curly braces defines the sql command and also sets the flag no_write_to_binlog. SQLCOM_FLUSH is important in the next phase where we get into actual C code.</p>
<p>flush_options used to define all of the possible options for a flush command. Going one step further down flush_options_list basically says that a flush command can contain more than one option.</p>
<pre>flush_options_list:
          flush_options_list ',' flush_option
        | flush_option
          {}
        ;</pre>
<p>Notice that flush_options_list can contain a flush_options_list. I don&#8217;t know the specifics of this but it is the yacc way of saying things can be repeated. In this case the | is saying that there can be multiple flush_option separated by a comma or just one option.</p>
<p>With flush_option: things start to make more sense. This is all of the different types of flush commands. Looking at the first part</p>
<pre>flush_option:
          ERROR_SYM LOGS_SYM
          { Lex-&gt;type|= REFRESH_ERROR_LOG; }
        | ENGINE_SYM LOGS_SYM
          { Lex-&gt;type|= REFRESH_ENGINE_LOG; }
        | GENERAL LOGS_SYM
          { Lex-&gt;type|= REFRESH_GENERAL_LOG; }
        | SLOW LOGS_SYM</pre>
<p>Reading it in english this is basically saying  &#8221;Error logs OR engine logs OR general logs OR slow logs&#8221; Combining this with the previous section allowing multiple flush options this is a valid query:</p>
<pre>
MariaDB [test]&gt; flush error logs, slow logs;
Query OK, 0 rows affected (0.00 sec)
</pre>
<p>The flush command is quite a bit improved in MariaDB 10. Comparing this to part of the flush_option: section from MariaDB 5.2 shows how much it has improved:</p>
<pre>
flush_option:
          table_or_tables
          { Lex->type|= REFRESH_TABLES; }
          opt_table_list {}
        | TABLES WITH READ_SYM LOCK_SYM
          { Lex->type|= REFRESH_TABLES | REFRESH_READ_LOCK; }
        | QUERY_SYM CACHE_SYM
          { Lex->type|= REFRESH_QUERY_CACHE_FREE; }
        | HOSTS_SYM
          { Lex->type|= REFRESH_HOSTS; }
        | PRIVILEGES
          { Lex->type|= REFRESH_GRANT; }
        | LOGS_SYM
          { Lex->type|= REFRESH_LOG; }
        | STATUS_SYM
          { Lex->type|= REFRESH_STATUS; }
</pre>
<p>In 5.2 the LOGS_SYM is alone which makes flush error logs an invalid query. By scanning the grammar in sql_yacc.yy it is easy to see which syntax is and isn&#8217;t supported between versions.</p>
<p>Now that a command of SQLCOM_FLUSH has been specified. The flush_option is passed in via Lex->type. Each option is bitwise ORed into type. It is time to switch over to C++ code and see how these are executed.</p>
<p>sql_parse.cc has a huge switch case statement that contains every possible command type that MySQL can process. For this example look for case SQLCOM_FLUSH: The SQLCOM_FLUSH is the same option from the grammar file. There is basically one important function under this section reload_acl_and_cache(). </p>
<p>In newer versions reload_acl_and_cache() is in sql_reload.cc. In older versions it is in sql_parse.cc This function basically checks each type of thing that can be flushed one by one to see if their flag has been ORed into Lex-type which is options here. It then calls the C++ code responsible for carrying out the flushing of that type of object.</p>
<p>Other types of calls can be traced the same way. Most of the token names can be easily grepped from sql_yacc.yy. Most of the show commands are handled similar to flush except when it gets into C++ code they are mapped into a special pair of arrays that tell MySQL how to generate a INFORMATION_SCHEMA table. </p>
<p>For the show commands the C++ code is in the sql_yacc.yy file as a call to prepare_schema_table(). There are two arrays that are important when adding a new table. In MariaDB 10 the first is enum_schema_tables in handler.cc. In older versions this array is in table.h. The other array is ST_SCHEMA_TABLE schema_tables in sql_show.cc. </p>
<p>schema_tables has the important information. Among other things it holds the text name of the table, the fields used to make it, and the function called to generate the data in the table. The fields list usually ends with _fields_info and the function used to create the result set used for the table starts with fill_.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59649&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59649&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 15 May 2013 05:50:13 +0000</pubDate>
    <dc:creator>Eric Bergen</dc:creator>
    <category>Geek</category>
    <category>MariaDB</category>
    <category>MySQL</category>
  </item>

  <item>
    <title>MySQL 5.6: Improvements in Thread Pool</title>
    <guid isPermaLink="false">http://dev.mysql.com/tech-resources/articles/mysql-thread-pool.html</guid>
    <link>http://dev.mysql.com/tech-resources/articles/mysql-thread-pool.html</link>
    <description>MySQL Thread Pool has now been updated for the MySQL 5.6 version. Obviously, with the much higher concurrency of the MySQL Server in 5.6 it's important that the thread pool doesn't add any new concurrency problem when scaling up to 60 CPU threads. The good news is that the thread pool works even better in MySQL 5.6 than in MySQL 5.5. MySQL 5.6 has fixed even more issues when it comes to execution of many concurrent queries and this means that the thread pool provides even more stable throughput almost independent of the number of queries sent to it in parallel.</description>
    <content:encoded><![CDATA[MySQL Thread Pool has now been updated for the MySQL 5.6 version. Obviously, with the much higher concurrency of the MySQL Server in 5.6 it's important that the thread pool doesn't add any new concurrency problem when scaling up to 60 CPU threads. The good news is that the thread pool works even better in MySQL 5.6 than in MySQL 5.5. MySQL 5.6 has fixed even more issues when it comes to execution of many concurrent queries and this means that the thread pool provides even more stable throughput almost independent of the number of queries sent to it in parallel.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68298&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68298&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 15 May 2013 00:59:59 +0000</pubDate>
    <dc:creator>MySQL</dc:creator>
  </item>

  <item>
    <title>The EXAMPLE storage engine</title>
    <guid isPermaLink="false">http://www.flamingspork.com/blog/?p=3332</guid>
    <link>http://www.flamingspork.com/blog/2013/05/15/the-example-storage-engine/?utm_source=rss&amp;amp;utm_medium=rss&amp;amp;utm_campaign=the-example-storage-engine</link>
    <description>The Example storage engine is meant to serve mainly as a code example of the stub of a storage engine for example purposes only (or so the code comment at the start of ha_example.cc reads). In reality however, it&amp;#8217;s not very useful. It likely was back in 2004 when it could be used as a starting point for starting some simple new engines (my guess would be that more than a few of the simpler engines started from ha_example.cc).
The sad reality is the complexity of the non-obviousness of the bits o the storage engine API you actually care about are documented in ha_ndbcluster.cc, ha_myisam.cc and ha_innodb.cc. If you&amp;#8217;re doing something that isn&amp;#8217;t already done by one of those three engines: good luck.
Whenever I looked at ha_example.cc I always wished there was something more behind it&amp;#8230; basically hoping that InnoDB would get a better and cleaner API with the server and would use that rather than the layering violations it has to do the interesting stuff.
That all being said, as a starting point, it probably helped spawn at least a dozen storage engines.</description>
    <content:encoded><![CDATA[<p>The Example storage engine is meant to serve mainly as a code example of the stub of a storage engine for example purposes only (or so the code comment at the start of ha_example.cc reads). In reality however, it&#8217;s not very useful. It likely was back in 2004 when it could be used as a starting point for starting some simple new engines (my guess would be that more than a few of the simpler engines started from ha_example.cc).</p>
<p>The sad reality is the complexity of the non-obviousness of the bits o the storage engine API you actually care about are documented in ha_ndbcluster.cc, ha_myisam.cc and ha_innodb.cc. If you&#8217;re doing something that isn&#8217;t already done by one of those three engines: good luck.</p>
<p>Whenever I looked at ha_example.cc I always wished there was something more behind it&#8230; basically hoping that InnoDB would get a better and cleaner API with the server and would use that rather than the layering violations it has to do the interesting stuff.</p>
<p>That all being said, as a starting point, it probably helped spawn at least a dozen storage engines.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59648&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59648&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 15 May 2013 00:12:36 +0000</pubDate>
    <dc:creator>Stewart Smith</dc:creator>
    <category>code</category>
    <category>mysql</category>
    <category>innodb</category>
    <category>storage engine api</category>
  </item>

  <item>
    <title>MySQL 5.6: single-threaded performance regressions</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-5915567578707286635.post-3951331356158760711</guid>
    <link>http://mysqlha.blogspot.com/2013/05/mysql-56-single-threaded-performance.html</link>
    <description>I ran single-threaded performance tests to compare MySQL using releases 4.0.30, 5.0.85, 5.1.63 and 5.6.11. On my simple tests 4.0.30 is almost 1.5X faster than 5.6.11. I think it is important to reduce these regressions. Maybe this is an area in which the forks (MariaDB, Percona) will lead the way? I previously opened bug 68825 for this and will update it with the results I report here. Peter and I have written about this previously. Bug 69236 is also open for this now.I used most of the advice from a&amp;nbsp;previous blog post to build &amp;amp; configure 5.6 for peak performance and that included disabling the performance schema at compile time. All binaries were compiled with the same version of gcc and used jemalloc. For 4.0, 5.0 and 5.6 the built-in version of InnoDB. For 5.1 the plug-in was used.Two of the tests below report the time in seconds to reload a table and a lower value is better. The other test reports QPS for sysbench point queries and a higher value is better. To avoid (or add) confusion from looking at one graph where less is better and another where more is better I list a value for&amp;nbsp;relative performance below and use that in the graphs. For relative performance a larger value is better and the result for 4.0.30 is the baseline. For the other binaries performance was always worse and the relative performance is less than 1.I also ran the sql-bench tests from the 4.0.30 release with all MySQL versions. The total time to run all tests was 789, 921, 911 and 1093 seconds for 4.0.30, 5.0.85, 5.1.63 and 5.6.11. Much of the 5.6 regression was from the create tests but there were significant regression for many tests.Bulk loadThe first workload is bulk load. I used mysqldump to dump all rows for a sysbench table with 16M rows. For the important configuration variables: the InnoDB buffer pool was 64G, the doublewrite buffer was disabled, the binlog was disabled and I set innodb_flush_log_at_trx_commit=2. The test was repeated using two files created by mysqldump. The first used --opt and the second used --opt --skip-extended-insert.Time to reload 16M rowsInput from mysqldump --optRelative-perf is Seconds-for-4.0.30 / Seconds&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Seconds &amp;nbsp;Relative-perf4.0.30 &amp;nbsp; &amp;nbsp; &amp;nbsp;143 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15.0.85 &amp;nbsp; &amp;nbsp; &amp;nbsp;178 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.805.1.63 &amp;nbsp; &amp;nbsp; &amp;nbsp;176 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.815.6.11 &amp;nbsp; &amp;nbsp; &amp;nbsp;203 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.70 -&amp;gt; no perf-schema5.6.11 &amp;nbsp; &amp;nbsp; &amp;nbsp;210 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.68 -&amp;gt; perf-schemaTime to reload 16M rowsInput from mysqldump --opt --skip-extended-insertRelative-perf is Seconds-for-4.0.30 / Seconds&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Seconds &amp;nbsp;Relative-perf4.0.30 &amp;nbsp; &amp;nbsp; &amp;nbsp;966 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15.0.85 &amp;nbsp; &amp;nbsp; 1150 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.845.1.63 &amp;nbsp; &amp;nbsp; 1201 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.805.6.11 &amp;nbsp; &amp;nbsp; 1274 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.76One source of overhead in 5.6 is the mysql client. For the first set of tests below that took 2 to 3 minutes the mysql client used 10 seconds of CPU time for 4.0.30 versus 26 seconds for 5.6. Why does it need 3X more CPU time? From CPU profile reports there is a lot more time in utf8 functions. I added results for 5.6.11 with perf-schema enabled &amp;amp; disabled at compile time. The table below has the CPU time (user + system) from the mysql client during the reload using the output from mysqldump --opt. There is a big regression from 4.0 to 5.1 mostly due to conversions to utf8. There is another regression from 5.1 to 5.6. I don't know why.5.6 user &amp;nbsp;0m25.121s sys &amp;nbsp; 0m0.629s -&amp;gt; 25.8 seconds5.1 user &amp;nbsp;0m19.884s sys &amp;nbsp; 0m0.747s -&amp;gt; 20.6 seconds5.0 user &amp;nbsp;0m18.700s sys &amp;nbsp; 0m0.853s -&amp;gt; 19.6 seconds4.0 user &amp;nbsp;0m8.994s &amp;nbsp;sys &amp;nbsp; 0m0.923s -&amp;gt; &amp;nbsp;9.9 secondsMy server was using these character sets:character_set_client      latin1character_set_connection  latin1character_set_database    latin1character_set_filesystem  binarycharacter_set_results     latin1character_set_server      latin1character_set_system      utf8Point lookupThe next workload is point queries from sysbench. These use auto-commit and fetch 1 row by primary key per query. The buffer pool was warmed prior to the test and cached all rows but the adaptive hash index was cold.Queries per second from sysbenchRelative-perf is QPS / QPS-for-4.0.30&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; QPS &amp;nbsp;Relative-perf4.0.30 &amp;nbsp; &amp;nbsp;14898 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15.0.85 &amp;nbsp; &amp;nbsp;12247 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.825.1.63 &amp;nbsp; &amp;nbsp;10538 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.715.6.11 &amp;nbsp; &amp;nbsp;10334 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.69</description>
    <content:encoded><![CDATA[I ran single-threaded performance tests to compare MySQL using releases 4.0.30, 5.0.85, 5.1.63 and 5.6.11. On my simple tests 4.0.30 is almost 1.5X faster than 5.6.11. I think it is important to reduce these regressions. Maybe this is an area in which the forks (MariaDB, Percona) will lead the way? I previously opened <a href="http://bugs.mysql.com/bug.php?id=68825">bug 68825</a> for this and will update it with the results I report here. <a href="http://www.mysqlperformanceblog.com/2013/03/27/why-mysql-performance-at-low-concurrency-is-important/">Peter</a> and <a href="http://mysqlha.blogspot.com/2013/03/mysql-56-single-threaded-read-only.html">I have written</a> about this previously. <a href="http://bugs.mysql.com/bug.php?id=69236">Bug 69236</a> is also open for this now.<br /><br />I used most of the advice from a&nbsp;<a href="http://mysqlha.blogspot.com/2013/04/mysql-56-incomplete-guide-to-avoiding.html">previous blog post</a> to build &amp; configure 5.6 for peak performance and that included disabling the performance schema at compile time. All binaries were compiled with the same version of gcc and used jemalloc. For 4.0, 5.0 and 5.6 the built-in version of InnoDB. For 5.1 the plug-in was used.<br /><br />Two of the tests below report the time in seconds to reload a table and a lower value is better. The other test reports QPS for sysbench point queries and a higher value is better. To avoid (or add) confusion from looking at one graph where less is better and another where more is better I list a value for&nbsp;<b>relative performance</b> below and use that in the graphs. For relative performance a larger value is better and the result for 4.0.30 is the baseline. For the other binaries performance was always worse and the relative performance is less than 1.<br /><br />I also ran the sql-bench tests from the 4.0.30 release with all MySQL versions. The total time to run all tests was 789, 921, 911 and 1093 seconds for 4.0.30, 5.0.85, 5.1.63 and 5.6.11. Much of the 5.6 regression was from the <b>create</b> tests but there were significant regression for many tests.<br /><br /><b>Bulk load</b><br /><br />The first workload is bulk load. I used mysqldump to dump all rows for a sysbench table with 16M rows. For the important configuration variables: the InnoDB buffer pool was 64G, the doublewrite buffer was disabled, the binlog was disabled and I set innodb_flush_log_at_trx_commit=2. The test was repeated using two files created by mysqldump. The first used <b>--opt</b> and the second used <b>--opt --skip-extended-insert</b>.<br /><br /><span>Time to reload 16M rows</span><br /><span>Input from mysqldump --opt</span><br /><span>Relative-perf is Seconds-for-4.0.30 / Seconds</span><br /><span>&nbsp; &nbsp; &nbsp; &nbsp; Seconds &nbsp;Relative-perf</span><br /><span>4.0.30 &nbsp; &nbsp; &nbsp;143 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1</span><br /><span>5.0.85 &nbsp; &nbsp; &nbsp;178 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.80</span><br /><span>5.1.63 &nbsp; &nbsp; &nbsp;176 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.81</span><br /><span>5.6.11 &nbsp; &nbsp; &nbsp;203 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.70 -&gt; no perf-schema</span><br /><span>5.6.11 &nbsp; &nbsp; &nbsp;210 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.68 -&gt; perf-schema</span><br /><span><br /></span><br /><div><a href="http://2.bp.blogspot.com/-tOOfa_S26vs/UZKR2xEioTI/AAAAAAAAAak/wUYoYDs8Ob8/s1600/chart_5.png" imageanchor="1"><img border="0" height="228" src="http://2.bp.blogspot.com/-tOOfa_S26vs/UZKR2xEioTI/AAAAAAAAAak/wUYoYDs8Ob8/s320/chart_5.png" width="320" /></a></div><br /><br /><span>Time to reload 16M rows</span><br /><span>Input from mysqldump --opt --skip-extended-insert</span><br /><span>Relative-perf is Seconds-for-4.0.30 / Seconds</span><br /><span>&nbsp; &nbsp; &nbsp; &nbsp; Seconds &nbsp;Relative-perf</span><br /><span>4.0.30 &nbsp; &nbsp; &nbsp;966 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1</span><br /><span>5.0.85 &nbsp; &nbsp; 1150 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.84</span><br /><span>5.1.63 &nbsp; &nbsp; 1201 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.80</span><br /><span>5.6.11 &nbsp; &nbsp; 1274 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.76</span><br /><span><br /></span><span><br /></span><br /><div><a href="http://1.bp.blogspot.com/-dswqe5vU-Hg/UZKR23JgI1I/AAAAAAAAAag/UjqOVqQOrmY/s1600/chart_4.png" imageanchor="1"><img border="0" height="228" src="http://1.bp.blogspot.com/-dswqe5vU-Hg/UZKR23JgI1I/AAAAAAAAAag/UjqOVqQOrmY/s320/chart_4.png" width="320" /></a></div><br />One source of overhead in 5.6 is the mysql client. For the first set of tests below that took 2 to 3 minutes the mysql client used 10 seconds of CPU time for 4.0.30 versus 26 seconds for 5.6. Why does it need 3X more CPU time? From CPU profile reports there is a lot more time in utf8 functions. I added results for 5.6.11 with perf-schema enabled &amp; disabled at compile time. The table below has the CPU time (user + system) from the <b>mysql</b> client during the reload using the output from <b>mysqldump --opt</b>. There is a big regression from 4.0 to 5.1 mostly due to conversions to utf8. There is another regression from 5.1 to 5.6. I don't know why.<br /><br /><span>5.6 user &nbsp;0m25.121s sys &nbsp; 0m0.629s -&gt; 25.8 seconds</span><br /><span>5.1 user &nbsp;0m19.884s sys &nbsp; 0m0.747s -&gt; 20.6 seconds</span><br /><span>5.0 user &nbsp;0m18.700s sys &nbsp; 0m0.853s -&gt; 19.6 seconds</span><br /><span>4.0 user &nbsp;0m8.994s &nbsp;sys &nbsp; 0m0.923s -&gt; &nbsp;9.9 seconds</span><br /><br /><span>My server was using these character sets:</span><br /><span><br /></span><pre><span>character_set_client      latin1<br />character_set_connection  latin1<br />character_set_database    latin1<br />character_set_filesystem  binary<br />character_set_results     latin1<br />character_set_server      latin1<br />character_set_system      utf8</span></pre><br /><br /><br /><br /><b>Point lookup</b><br /><br />The next workload is point queries from sysbench. These use auto-commit and fetch 1 row by primary key per query. The buffer pool was warmed prior to the test and cached all rows but the adaptive hash index was cold.<br /><br /><span>Queries per second from sysbench</span><br /><span>Relative-perf is QPS / QPS-for-4.0.30</span><br /><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QPS &nbsp;Relative-perf</span><br /><span>4.0.30 &nbsp; &nbsp;14898 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1</span><br /><span>5.0.85 &nbsp; &nbsp;12247 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.82</span><br /><span>5.1.63 &nbsp; &nbsp;10538 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.71</span><br /><span>5.6.11 &nbsp; &nbsp;10334 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.69</span><br /><span><br /></span><br /><div><a href="http://1.bp.blogspot.com/-ShyRrAof2nw/UZKUqJjY4MI/AAAAAAAAAa4/cAAPtHNrZkI/s1600/chart_6.png" imageanchor="1"><img border="0" height="228" src="http://1.bp.blogspot.com/-ShyRrAof2nw/UZKUqJjY4MI/AAAAAAAAAa4/cAAPtHNrZkI/s320/chart_6.png" width="320" /></a></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59647&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59647&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 14 May 2013 19:54:00 +0000</pubDate>
    <dc:creator>Mark Callaghan</dc:creator>
    <category>mysql</category>
  </item>

  <item>
    <title>How to tell whether MySQL Server uses yaSSL or OpenSSL</title>
    <guid isPermaLink="false">http://mysqlblog.fivefarmers.com/?p=563</guid>
    <link>http://mysqlblog.fivefarmers.com/2013/05/14/how-to-tell-whether-mysql-server-uses-yassl-or-openssl/</link>
    <description>Starting with MySQL 5.6, MySQL commercial-license builds use OpenSSL.  yaSSL &amp;#8211; previously used as the default SSL library for all builds &amp;#8211; remains the implementation for Community (GPL) builds, and users comfortable building from source can choose to build with OpenSSL instead.  Daniel van Eeden recently requested a global variable to indicate which SSL library was used to compile the server (bug#69226), and it&amp;#8217;s a good request.  It&amp;#8217;s something I&amp;#8217;ve previously requested as well, having been fooled by the use of have_openssl as a synonym for have_ssl (I&amp;#8217;m sure it made sense at the time, right?).  
I found a workaround (at least as of 5.6.6 and more recent) which gives an indication whether yaSSL or OpenSSL was used.  The Rsa_public_key status variable is explicitly defined only when yaSSL libraries are not used:
#ifndef HAVE_YASSL
  {&quot;Rsa_public_key&quot;,           (char*) &amp;amp;show_rsa_public_key, SHOW_FUNC},
#endif
As a result, MySQL Enterprise 5.6.10 (with OpenSSL) has Rsa_public_key status variable:
mysql&amp;gt; select version();
+---------------------------------------+
| version()                             |
+---------------------------------------+
| 5.6.10-enterprise-commercial-advanced |
+---------------------------------------+
1 row in set (0.02 sec)

mysql&amp;gt; show status like '%rsa%';
+----------------+-------+
| Variable_name  | Value |
+----------------+-------+
| Rsa_public_key |       |
+----------------+-------+
1 row in set (0.00 sec)

while MySQL Community 5.6.10 does not:

mysql&amp;gt; select version();
+-----------+
| version() |
+-----------+
| 5.6.10    |
+-----------+
1 row in set (0.00 sec)

mysql&amp;gt; show status like '%rsa%';
Empty set (0.00 sec)
Hopefully that will help others that have a need similar to Daniel and myself.  Hopefully we&amp;#8217;ll get a global status variable that makes this indirect method obsolete.</description>
    <content:encoded><![CDATA[<p>Starting with MySQL 5.6, MySQL commercial-license builds use OpenSSL.  yaSSL &#8211; previously used as the default SSL library for all builds &#8211; remains the implementation for Community (GPL) builds, and users comfortable building from source can <a href="http://dev.mysql.com/doc/refman/5.6/en/configuring-for-ssl.html" target="_blank">choose to build with OpenSSL</a> instead.  Daniel van Eeden recently requested a global variable to indicate which SSL library was used to compile the server (<a href="http://bugs.mysql.com/bug.php?id=69226" target="_blank">bug#69226</a>), and it&#8217;s a good request.  It&#8217;s something I&#8217;ve previously requested as well, having been fooled by the use of <a href="http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_have_openssl">have_openssl</a> as a synonym for <a href="http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_have_ssl" target="_blank">have_ssl </a>(I&#8217;m sure it made sense <a href="http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_have_openssl" target="_blank">at the time</a>, right?).  <span></span></p>
<p>I found a workaround (at least as of 5.6.6 and more recent) which gives an indication whether yaSSL or OpenSSL was used.  The <strong><em>Rsa_public_key</em></strong> status variable is explicitly defined only when yaSSL libraries are <em>not</em> used:</p>
<pre>#ifndef HAVE_YASSL
  {"Rsa_public_key",           (char*) &amp;show_rsa_public_key, SHOW_FUNC},
#endif</pre>
<p>As a result, MySQL Enterprise 5.6.10 (with OpenSSL) has <strong><em>Rsa_public_key</em></strong> status variable:</p>
<pre>mysql&gt; select version();
+---------------------------------------+
| version()                             |
+---------------------------------------+
| 5.6.10-enterprise-commercial-advanced |
+---------------------------------------+
1 row in set (0.02 sec)

mysql&gt; show status like '%rsa%';
+----------------+-------+
| Variable_name  | Value |
+----------------+-------+
| Rsa_public_key |       |
+----------------+-------+
1 row in set (0.00 sec)

while MySQL Community 5.6.10 does not:

mysql&gt; select version();
+-----------+
| version() |
+-----------+
| 5.6.10    |
+-----------+
1 row in set (0.00 sec)

mysql&gt; show status like '%rsa%';
Empty set (0.00 sec)</pre>
<p>Hopefully that will help others that have a need similar to Daniel and myself.  Hopefully we&#8217;ll get a global status variable that makes this indirect method obsolete.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59645&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59645&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 14 May 2013 17:59:05 +0000</pubDate>
    <dc:creator>Todd Farmer</dc:creator>
    <category>MySQL</category>
    <category>MySQL 5.6</category>
    <category>security</category>
  </item>

  <item>
    <title>MySQL &amp;quot;mini-seminar&amp;quot; in Trondheim, Norway!</title>
    <guid isPermaLink="false">https://blogs.oracle.com/MySQL/entry/mysql_mini_seminar_in_trondheim</guid>
    <link>https://blogs.oracle.com/MySQL/entry/mysql_mini_seminar_in_trondheim</link>
    <description>I would like to invite everyone who is around Trondheim, Norway to the &amp;quot;MySQL mini-seminar&amp;quot; taking place on June 19, 2013 in Oracle office. Do not miss this great opportunity to meet great MySQL engineers who are looking forward to meeting you and talking about MySQL!!!
  Please see the official invitation in English and Norwegian below.
  Invitation to MySQL mini-seminarMany people are unaware that a great number of the MySQL developers are located in Trondheim, Norway, and that we have a lot of competence we would love to share.We therefore invite anyone in Trondheim who's interested in MySQL to a mini-seminar located the Oracle's offices on Lade, June 19 at 3 pm. 
  The agenda will be:
  
    Presentation: MySQL Query Optimizer: an overview, by Jørgen Løland, MySQL Optimizer team
    Q&amp;amp;A, discussions
    Suggestions for presentations on future mini-seminars
    Food and mingling.
  
  Don't miss this opportunity to meet with other MySQL users and developers behind the worlds most popular open source database system!Date: June 19Time: 3pm - 6pmLocation: Oracle, Haakon VIIs g 7b. (across the road from City Lade)Registration: jorgen.loland@oracle.comRemember to register so we know how many to expect.
  Invitasjon til MySQL mini-seminarFor mange er det ukjent at en stor andel av utviklerne bak MySQL holder til i Trondheim, og vi har mye kompetanse som vi gjerne vil dele.MySQL-interesserte i Trondheim inviteres derfor til mini-seminar i Oracles lokaler på Lade 19. juni kl 15:00. 
  Programmet vil bestå av:
  
    Faglig: MySQL Query Optimizer: an overview, ved Jørgen Løland, MySQL Optimizer team
    Spørsmål og diskusjon
    Forslag til faglig innhold ved framtidige mini-seminarer.
    Mat og mingling.
  
  Ikke gå glipp av denne muligheten til å møte både andre MySQL brukere og utviklere bak verdens mest populære open source databasesystem!Dato: 19. juniTidspunkt: 15:00 - 18:00Sted: Oracle, Haakon VIIs g 7b. (rett over veien fra City Lade)Påmelding: jorgen.loland@oracle.comHusk å melde deg på slik at vi vet omtrent hvor mange vi blir. </description>
    <content:encoded><![CDATA[<p>I would like to invite everyone who is around Trondheim, Norway to the &quot;MySQL mini-seminar&quot; taking place on June 19, 2013 in Oracle office. Do not miss this great opportunity to meet great MySQL engineers who are looking forward to meeting you and talking about MySQL!!!</p>
  <p>Please see the official invitation in English and Norwegian below.<br /></p>
  <p><u><b>Invitation to MySQL mini-seminar</b></u><br /><br />Many people are unaware that a great number of the MySQL developers are located in Trondheim, Norway, and that we have a lot of competence we would love to share.<br /><br />We therefore invite anyone in Trondheim who's interested in MySQL to a mini-seminar located the Oracle's offices on Lade, June 19 at 3 pm. <b></b></p>
  <p><b>The agenda will be:</b><br /></p>
  <ul>
    <li>Presentation: MySQL Query Optimizer: an overview, by Jørgen Løland, MySQL Optimizer team</li>
    <li>Q&amp;A, discussions</li>
    <li>Suggestions for presentations on future mini-seminars</li>
    <li>Food and mingling.</li>
  </ul>
  <p>Don't miss this opportunity to meet with other MySQL users and developers behind the worlds most popular open source database system!<br /><br /><b>Date</b>: June 19<br /><b>Time</b>: 3pm - 6pm<br /><b>Location</b>: Oracle, Haakon VIIs g 7b. (across the road from City Lade)<br /><b>Registration</b>: <a href="mailto:%20jorgen.loland@oracle.com">jorgen.loland@oracle.com</a><br />Remember to register so we know how many to expect.<br /></p><hr />
  <p><u><b>Invitasjon til MySQL mini-seminar</b></u><br /><br />For mange er det ukjent at en stor andel av utviklerne bak MySQL holder til i Trondheim, og vi har mye kompetanse som vi gjerne vil dele.<br /><br />MySQL-interesserte i Trondheim inviteres derfor til mini-seminar i Oracles lokaler på Lade 19. juni kl 15:00. </p>
  <p><b>Programmet vil bestå av:</b><br /></p>
  <ul>
    <li>Faglig: MySQL Query Optimizer: an overview, ved Jørgen Løland, MySQL Optimizer team</li>
    <li>Spørsmål og diskusjon</li>
    <li>Forslag til faglig innhold ved framtidige mini-seminarer.</li>
    <li>Mat og mingling.</li>
  </ul>
  <p>Ikke gå glipp av denne muligheten til å møte både andre MySQL brukere og utviklere bak verdens mest populære open source databasesystem!<br /><br /><b>Dato</b>: 19. juni<br /><b>Tidspunkt</b>: 15:00 - 18:00<br /><b>Sted</b>: Oracle, Haakon VIIs g 7b. (rett over veien fra City Lade)<br /><b>Påmelding</b>: jorgen.loland@oracle.com<br />Husk å melde deg på slik at vi vet omtrent hvor mange vi blir. </p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59644&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59644&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 14 May 2013 14:37:51 +0000</pubDate>
    <dc:creator>Oracle MySQL Group</dc:creator>
    <category>Community</category>
    <category>community</category>
    <category>events</category>
    <category>meeting</category>
    <category>mysql</category>
  </item>

  <item>
    <title>MySQL Connector/Python 1.0.10 available for download</title>
    <guid isPermaLink="false">http://geert.vanderkelen.org/?p=1042</guid>
    <link>http://geert.vanderkelen.org/mysql-connectorpython-1-0-10-available-for-download/</link>
    <description>Last week we released MySQL Connector/Python v1.0.10. Release notes can be found in the MySQL Developver Zone.
A notable fix in Connector/Python v1.0.10 which might interest a few users is adding support for LOAD DATA LOCAL INFILE. It allows you to import CSV using a simple SQL statement.
Please use the MySQL Bugs website to report any problem.
Some useful links:

Documentation: http://dev.mysql.com/doc/connector-python/en/index.html
Release Notes: http://dev.mysql.com/doc/relnotes/connector-python/en/index.html
Downloads: http://dev.mysql.com/downloads/connector/python/#downloads
Feedback: http://bugs.mysql.com
Forum: http://forums.mysql.com/list.php?50

Enjoy!</description>
    <content:encoded><![CDATA[<p>Last week we released <a href="http://www.mysql.com">MySQL</a> Connector/<a href="http://www.python.org">Python</a> v1.0.10. Release notes can be found in the <a href="http://dev.mysql.com/doc/relnotes/connector-python/en/news-1-0-10.html" title="MySQL Connector/Python v1.0.10 release notes" target="_blank">MySQL Developver Zone</a>.</p>
<p>A notable fix in Connector/Python v1.0.10 which might interest a few users is adding support for <a href="http://dev.mysql.com/doc/refman/5.6/en/load-data.html" target="_blank">LOAD DATA LOCAL INFILE</a>. It allows you to import <a href="http://en.wikipedia.org/wiki/Comma-separated_values" target="_blank">CSV</a> using a simple SQL statement.</p>
<p>Please use the <a href="http://bugs.mysql.com" target="_blank">MySQL Bugs website</a> to report any problem.</p>
<p>Some useful links:</p>
<ul>
<li>Documentation: <a href="http://dev.mysql.com/doc/connector-python/en/index.html" target="_blank">http://dev.mysql.com/doc/connector-python/en/index.html</a></li>
<li>Release Notes: <a href="http://dev.mysql.com/doc/relnotes/connector-python/en/index.html">http://dev.mysql.com/doc/relnotes/connector-python/en/index.html</a>
<li>Downloads: <a href="http://dev.mysql.com/downloads/connector/python/#downloads" target="_blank">http://dev.mysql.com/downloads/connector/python/#downloads</a></li>
<li>Feedback: <a href="http://bugs.mysql.com" target="_blank">http://bugs.mysql.com</a></li>
<li>Forum: <a href="http://forums.mysql.com/list.php?50" target="_blank">http://forums.mysql.com/list.php?50</a></li>
</ul>
<p>Enjoy!</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59640&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59640&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 14 May 2013 12:15:27 +0000</pubDate>
    <dc:creator>Geert Vanderkelen</dc:creator>
    <category>MySQL</category>
    <category>Python</category>
    <category>Work</category>
    <category>myconnpy</category>
    <category>mysql</category>
    <category>python</category>
    <category>work</category>
  </item>

  <item>
    <title>MySQL User Group NL Meetup May 31 at Snow</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-1135944569112521190.post-6888666733406983328</guid>
    <link>http://databaseblog.myname.nl/2013/05/mysql-user-group-nl-meetup-may-31-at.html</link>
    <description>The third meeting for the MySQL User Group NL will be hosted by Snow B.V. in the Snow office in Geldermalsen.&amp;nbsp;The Agenda:Choosing the Best Sharding Policy - Doran Levari (ScaleBase, using a video link)Performance Monitoring with Statsd and Graphite - Art van Scheppingen (Spil Games)Basic MySQL performance tuning for sysadmins - Daniël van Eeden (Snow)Please RSVP on the meetup.com page.The user group now has more than 100 members!</description>
    <content:encoded><![CDATA[The third meeting for the MySQL User Group NL will be hosted by <a href="http://snow.nl/">Snow B.V.</a> in the <a href="http://www.snow.nl/contact.html">Snow office in Geldermalsen</a>.<br />&nbsp;<br />The Agenda:<br /><ul><li><b>Choosing the Best Sharding Policy</b> - Doran Levari (<a href="http://www.scalebase.com/">ScaleBase</a>, using a video link)</li><li><b>Performance Monitoring with Statsd and Graphite</b> - Art van Scheppingen (<a href="http://www.spilgames.com/">Spil Games</a>)</li><li><b>Basic MySQL performance tuning for sysadmins</b> - Daniël van Eeden (<a href="http://snow.nl/">Snow</a>)</li></ul>Please RSVP on the <a href="http://www.meetup.com/MySQL-User-Group-NL/events/97461442/">meetup.com page</a>.<br /><br />The user group now has more than 100 members!<br /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59639&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59639&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 14 May 2013 12:00:00 +0000</pubDate>
    <dc:creator>Daniel van Eeden</dc:creator>
    <category>scalebase</category>
    <category>meeting</category>
    <category>snow</category>
  </item>

  <item>
    <title>Archive vs Percona XtraDB vs Tokutek TokuDB LOAD DATA performance</title>
    <guid isPermaLink="false">http://swanhart.livejournal.com/136493.html</guid>
    <link>http://swanhart.livejournal.com/136493.html</link>
    <description>Stewart blogged about the archive storage engine and he asked the Internet to test how fast ARCHIVE is compared with other MySQL storage engines like Percona XtraDB and Tokutek TokuDB.    Since I've been curious about this subject as well, I decided to give it a quick test.Not very compressible dataI took a star schema benchmark &quot;lineorder&quot;  file and grabbed the first 15M rows. To each row I added a TEXT field called &quot;extra_data&quot;.  This field contains 10 random words from /usr/share/dict/words separated by space. This adds up to just about 3GB of raw input data.Insert performance with no indexes (best to worst)TokuDB: 187K rows/secQuery OK, 15000000 rows affected (1 min 20.25 sec)XtraDB (uncompressed): 119K rows/sec:Query OK, 15000000 rows affected (2 min 5.40 sec)Archive: 61K rows/sec:Query OK, 15000000 rows affected (4 min 3.15 sec)XtraDB Compressed key_block_size=8: 6K row/sec:I cancelled after 6 mins, that is 2.2M rows of 15M rows. ---TRANSACTION 514, ACTIVE 365 sec inserting
1 lock struct(s), heap size 376, 0 row lock(s), undo log entries 2233162Test with indexesI added the following keys to the table:alter table insert_test add key(LO_CustKey), add key(LO_OrderDateKey),
add key(LO_SuppKey), add key(LO_PartKey);I then loaded the table as before to see how multiple indexes affect insert performance.TokuDB: 84K rows/sec:Query OK, 15000000 rows affected (2 min 58.42 sec)InnoDB: 53K rows/sec:Query OK, 15000000 rows affected (4 min 40.05 sec)Insert performance with more highly compressible dataThis time I took the first 5M rows, but instead of just adding 10 random words, I added the words in a repeating &quot;phrase&quot;. For example: &quot;word1 word2 ... word10 word1 word2 ... word10 word1 ...&quot;. This generated about the same amount of data.TokuDB (no indexes): 92K rows/sec:Query OK, 5000000 rows affected (45.34 sec)TokuDB (with indexes): 66K rows/sec:Query OK, 5000000 rows affected (1 min 14.89 sec)XtraDB (no indexes): 65K rows/sec:Query OK, 5000000 rows affected (1 min 16.75 sec)Archive: 43K rows/sec:Query OK, 5000000 rows affected (1 min 55.24 sec)XtraDB (with indexes): 36.6K rows/sec:Query OK, 5000000 rows affected (2 min 16.23 sec)XtraDB Compressed key_block_size=8 (no indexes): 19.25K rows/sec:Query OK, 5000000 rows affected (4 min 20.12 sec)XtraDB Compressed key_block_size=8 (with indexes): 7.59K rows/sec:Query OK, 5000000 rows affected (10 min 58.43 sec)Building index on copy of the 15M row table (best to worst)alter table sortbuild_test  add key(LO_CustKey), add key(LO_OrderDateKey),  add key(LO_SuppKey), add key(LO_PartKey);[edit: Fixed order to put TokuDB first]TokuDB:Query OK, 0 rows affected (1 min 40.55 sec)XtraDB:Query OK, 0 rows affected (2 min 21.93 sec)Building index on copy of the 5M row table (InnoDB 8k only)XtraDB Compressed key_block_size=8:Query OK, 0 rows affected (1 min 14.05 sec)Data size comparison (smallest disk footprint to largest)[edit]These numbers were calculated using INFORMATION_SCHEMA.TABLES which reports the UNCOMPRESSED size for TokuDB tables.  I hope they fix this in a new release.  See the comments for a look at the tokudb data directory contents.+------------------------------+-------------------+---------+---------+----------+
| table_schema                 | table_name        | data_mb | idx_mb  | sum_size |
+------------------------------+-------------------+---------+---------+----------+
| archive_phrase               | insert_test       |  529.78 |    0.00 |   529.78 |
| archive                      | insert_test       | 1386.51 |    0.00 |  1386.51 |
| innodb_compressed_phrase     | insert_test_8k    | 1601.00 |    0.00 |  1601.00 |
| innodb_compressed_phrase_idx | sortbuild_test_8k | 1601.00 |  151.30 |  1752.30 |
| innodb_compressed_phrase_idx | insert_test_8k    | 1601.00 |  433.83 |  2034.83 |
| tokudb                       | insert_test       |    X    |    X    |     X    |
| tokudb_phrase                | insert_test       |    X    |    X    |     X    |
| tokudb_phrase_idx            | insert_test       |    X    |    X    |     X    |
| innodb                       | insert_test       | 3112.00 |    0.00 |  3112.00 |
| innodb_phrase                | insert_test       | 3202.00 |    0.00 |  3202.00 |
| tokudb_idx                   | insert_test       |    X    |    X    |     X    |
| tokudb_idx                   | sortbuild_test    |    X    |    X    |     X    |
| innodb_phrase_idx            | insert_test       | 3202.00 |  565.03 |  3767.03 |
| innodb_idx                   | sortbuild_test    | 3112.00 |  899.19 |  4011.19 |
| innodb_idx                   | insert_test       | 3112.00 | 1519.00 |  4631.00 |
+------------------------------+-------------------+---------+---------+----------+[edit]The TokuDB test table is 1800MB (15M row table, 3G orig size) The TokuDB test2 table is 2171MB (keys built with ALTER)The tokudb_idx database is 2202MB (keys built with INSERT)The tokudb_phrase database is 681MB (5M row, 3G orig size)The tokudb_phrase_idx database is 806MB (5M row, keys built with INSERT)[/edit]Here is the CREATE TABLE for the data:CREATE TABLE IF NOT EXISTS insert_test
(
LO_OrderKey bigint not null,
LO_LineNumber tinyint not null,
LO_CustKey int not null,
LO_PartKey int not null,
LO_SuppKey int not null,
LO_OrderDateKey int not null,
LO_OrderPriority varchar(15),
LO_ShipPriority char(1),
LO_Quantity tinyint,
LO_ExtendedPrice decimal,
LO_OrdTotalPrice decimal,
LO_Discount decimal,
LO_Revenue decimal,
LO_SupplyCost decimal,
LO_Tax tinyint,
LO_CommitDateKey int not null,
LO_ShipMode varchar(10),
extra_data TEXT
);

For compression:
ROW_FORMAT=compressed, KEY_BLOCK_SIZE=8
Here is the my.cnf for Percona XtraDB (not tuning for tokudb):
[mysqld]
#datadir=/data/datadirs/tokudb_55
datadir=/data/datadirs/percona_55
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

innodb_buffer_pool_size=16G
innodb_log_file_size=4G
innodb_flush_neighbor_pages=cont
innodb_fast_checksum
innodb_file_per_table
innodb_file_format=barracuda
innodb_buffer_pool_instances=6
innodb_write_io_threads=12
innodb_read_io_threads=12
innodb_flush_method=O_DIRECT
innodb_io_capacity=10000

read_buffer_size=2M
key_buffer_size=32M

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[edit]Test Hardware:
Intel i970-3.2GHz 6 core w/HT (12 threads)
24GB RAM
LSI 9211-8i IT HBA
DB on software RAID 0 - Two Intel 520 SSD, one OCZ vertex.  300GB total.</description>
    <content:encoded><![CDATA[<a href="http://www.flamingspork.com/blog/2013/05/14/the-archive-storage-engine" rel="nofollow">Stewart blogged about the archive storage engine</a> and he asked the Internet to test how fast ARCHIVE is compared with other MySQL storage engines like Percona XtraDB and Tokutek TokuDB.    Since I've been curious about this subject as well, I decided to give it a quick test.<br /><a name="cutid1"></a><a name='cutid1-end'></a><br /><h1>Not very compressible data</h1><br />I took a star schema benchmark "lineorder"  file and grabbed the first 15M rows. To each row I added a TEXT field called "extra_data".  This field contains 10 random words from /usr/share/dict/words separated by space. This adds up to just about 3GB of raw input data.<br /><br /><h2>Insert performance with no indexes (best to worst)</h2><br />TokuDB: 187K rows/sec<br /><pre>Query OK, 15000000 rows affected (1 min 20.25 sec)</pre><br /><br />XtraDB (uncompressed): 119K rows/sec:<br /><pre>Query OK, 15000000 rows affected (2 min 5.40 sec)</pre><br /><br />Archive: 61K rows/sec:<br /><pre>Query OK, 15000000 rows affected (4 min 3.15 sec)</pre><br /><br />XtraDB Compressed key_block_size=8: 6K row/sec:<br />I cancelled after 6 mins, that is 2.2M rows of 15M rows. <br /><pre>---TRANSACTION 514, ACTIVE 365 sec inserting
1 lock struct(s), heap size 376, 0 row lock(s), undo log entries 2233162</pre><br /><br /><h1>Test with indexes</h1><br />I added the following keys to the table:<br /><pre>alter table insert_test add key(LO_CustKey), add key(LO_OrderDateKey),
add key(LO_SuppKey), add key(LO_PartKey);</pre><br /><br />I then loaded the table as before to see how multiple indexes affect insert performance.<br /><br />TokuDB: 84K rows/sec:<br /><pre>Query OK, 15000000 rows affected (2 min 58.42 sec)</pre><br /><br />InnoDB: 53K rows/sec:<br /><pre>Query OK, 15000000 rows affected (4 min 40.05 sec)</pre><br /><br /><h2>Insert performance with more highly compressible data</h2><br />This time I took the first 5M rows, but instead of just adding 10 random words, I added the words in a repeating "phrase". For example: "word1 word2 ... word10 word1 word2 ... word10 word1 ...". This generated about the same amount of data.<br /><br />TokuDB (no indexes): 92K rows/sec:<br /><pre>Query OK, 5000000 rows affected (45.34 sec)</pre><br /><br />TokuDB (with indexes): 66K rows/sec:<br /><pre>Query OK, 5000000 rows affected (1 min 14.89 sec)</pre><br /><br />XtraDB (no indexes): 65K rows/sec:<br /><pre>Query OK, 5000000 rows affected (1 min 16.75 sec)</pre><br /><br />Archive: 43K rows/sec:<br /><pre>Query OK, 5000000 rows affected (1 min 55.24 sec)</pre><br /><br />XtraDB (with indexes): 36.6K rows/sec:<br /><pre>Query OK, 5000000 rows affected (2 min 16.23 sec)</pre><br /><br />XtraDB Compressed key_block_size=8 (no indexes): 19.25K rows/sec:<br /><pre>Query OK, 5000000 rows affected (4 min 20.12 sec)</pre><br /><br />XtraDB Compressed key_block_size=8 (with indexes): 7.59K rows/sec:<br /><pre>Query OK, 5000000 rows affected (10 min 58.43 sec)</pre><br /><br /><h1>Building index on copy of the 15M row table (best to worst)</h1><br /><pre>alter table sortbuild_test  add key(LO_CustKey), add key(LO_OrderDateKey),  add key(LO_SuppKey), add key(LO_PartKey);</pre><br />[edit: Fixed order to put TokuDB first]<br />TokuDB:<br /><pre>Query OK, 0 rows affected (1 min 40.55 sec)</pre><br /><br />XtraDB:<br /><pre>Query OK, 0 rows affected (2 min 21.93 sec)</pre><br /><br /><br /><br /><h1>Building index on copy of the 5M row table (InnoDB 8k only)</h1><br /><br />XtraDB Compressed key_block_size=8:<br /><pre>Query OK, 0 rows affected (1 min 14.05 sec)</pre><br /><br /><br /><h1>Data size comparison (smallest disk footprint to largest)</h1><br />[edit]<br />These numbers were calculated using INFORMATION_SCHEMA.TABLES which reports the UNCOMPRESSED size for TokuDB tables.  I hope they fix this in a new release.  See the comments for a look at the tokudb data directory contents.<br /><br /><pre>+------------------------------+-------------------+---------+---------+----------+
| table_schema                 | table_name        | data_mb | idx_mb  | sum_size |
+------------------------------+-------------------+---------+---------+----------+
| archive_phrase               | insert_test       |  529.78 |    0.00 |   529.78 |
| archive                      | insert_test       | 1386.51 |    0.00 |  1386.51 |
| innodb_compressed_phrase     | insert_test_8k    | 1601.00 |    0.00 |  1601.00 |
| innodb_compressed_phrase_idx | sortbuild_test_8k | 1601.00 |  151.30 |  1752.30 |
| innodb_compressed_phrase_idx | insert_test_8k    | 1601.00 |  433.83 |  2034.83 |
| tokudb                       | insert_test       |    X    |    X    |     X    |
| tokudb_phrase                | insert_test       |    X    |    X    |     X    |
| tokudb_phrase_idx            | insert_test       |    X    |    X    |     X    |
| innodb                       | insert_test       | 3112.00 |    0.00 |  3112.00 |
| innodb_phrase                | insert_test       | 3202.00 |    0.00 |  3202.00 |
| tokudb_idx                   | insert_test       |    X    |    X    |     X    |
| tokudb_idx                   | sortbuild_test    |    X    |    X    |     X    |
| innodb_phrase_idx            | insert_test       | 3202.00 |  565.03 |  3767.03 |
| innodb_idx                   | sortbuild_test    | 3112.00 |  899.19 |  4011.19 |
| innodb_idx                   | insert_test       | 3112.00 | 1519.00 |  4631.00 |
+------------------------------+-------------------+---------+---------+----------+</pre><br /><br />[edit]<br />The TokuDB test table is 1800MB (15M row table, 3G orig size) <br />The TokuDB test2 table is 2171MB (keys built with ALTER)<br />The tokudb_idx database is 2202MB (keys built with INSERT)<br />The tokudb_phrase database is 681MB (5M row, 3G orig size)<br />The tokudb_phrase_idx database is 806MB (5M row, keys built with INSERT)<br />[/edit]<br /><br />Here is the CREATE TABLE for the data:<br /><pre>CREATE TABLE IF NOT EXISTS insert_test
(
LO_OrderKey bigint not null,
LO_LineNumber tinyint not null,
LO_CustKey int not null,
LO_PartKey int not null,
LO_SuppKey int not null,
LO_OrderDateKey int not null,
LO_OrderPriority varchar(15),
LO_ShipPriority char(1),
LO_Quantity tinyint,
LO_ExtendedPrice decimal,
LO_OrdTotalPrice decimal,
LO_Discount decimal,
LO_Revenue decimal,
LO_SupplyCost decimal,
LO_Tax tinyint,
LO_CommitDateKey int not null,
LO_ShipMode varchar(10),
extra_data TEXT
);

For compression:
ROW_FORMAT=compressed, KEY_BLOCK_SIZE=8
</pre><br /><br />Here is the my.cnf for Percona XtraDB (not tuning for tokudb):<br /><pre>
[mysqld]
#datadir=/data/datadirs/tokudb_55
datadir=/data/datadirs/percona_55
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

innodb_buffer_pool_size=16G
innodb_log_file_size=4G
innodb_flush_neighbor_pages=cont
innodb_fast_checksum
innodb_file_per_table
innodb_file_format=barracuda
innodb_buffer_pool_instances=6
innodb_write_io_threads=12
innodb_read_io_threads=12
innodb_flush_method=O_DIRECT
innodb_io_capacity=10000

read_buffer_size=2M
key_buffer_size=32M

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

</pre><br />[edit]<br />Test Hardware:<br /><pre>
Intel i970-3.2GHz 6 core w/HT (12 threads)
24GB RAM
LSI 9211-8i IT HBA
DB on software RAID 0 - Two Intel 520 SSD, one OCZ vertex.  300GB total.</pre><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59638&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59638&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 14 May 2013 10:25:22 +0000</pubDate>
    <dc:creator>Justin Swanhart</dc:creator>
  </item>

  <item>
    <title>Is Synchronous Replication right for your app?</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15298</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/14/is-synchronous-replication-right-for-your-app/</link>
    <description>I talk with lot of people who are really interested in Percona XtraDB Cluster (PXC) and mostly they are interested in PXC as a high-availability solution.  But, what they tend not to think too much about is if moving from async to synchronous replication is right for their application or not.Facts about Galera replicationThere&amp;#8217;s a lot of different facts about Galera that come into play here, and it isn&amp;#8217;t always obvious how they will affect your database workload.  For example:Transaction commit takes approximately the worst packet round trip time (RTT) between any two nodes in your cluster.Transaction apply on slave nodes is still asynchronous from client commit (except on the original node where the transaction is committed)Galera prevents writing conflicts to these pending transactions while they are inflight in the form of deadlock errors.  (This is actually a form of Eventual Consistency where the client is forced to correct the problem before it can commit.  It is NOT the typical form of Eventual Consistency, known as asynchronous repair, that most people think of). Callaghan&amp;#8217;s LawBut what does that all actually mean?  Well, at the Percona Live conference a few weeks ago I heard a great maxim that really helps encapsulate a lot of this information and puts it into context with your application workload:[In a Galera cluster] a given row can&amp;#8217;t be modified more than once per RTTThis was attributed to Mark Callaghan from Facebook by Alexey Yurchenko from Codership at his conference talk.  Henceforth this will be known as &amp;#8220;Callaghan&amp;#8217;s law&amp;#8221; in Galera circles forever, though Mark didn&amp;#8217;t immediately recall saying it.Applied to a standalone Innodb instanceLet&amp;#8217;s break it down a bit.  Our unit of locking in Innodb is a single row (well, the PRIMARY KEY index entry for that row).  This means typically on a single Innodb node we can have all sorts modifications floating around as long as they don&amp;#8217;t touch the same row.  Row locks are held for modifications until the transaction commits and that takes an fsync to the redo log by default, so applying Callaghan&amp;#8217;s law to single-server Innodb, we&amp;#8217;d get:[On a single node Innodb server] a given row can&amp;#8217;t be modified more than the time to fsyncYou can obviously relax that by simply not fsyncing every transaction (innodb_flush_log_at_trx_commit != 1), or work around it with by fsyncing to memory (Battery or capacitor-backed write cache), etc., but the principle is basically the same.  If we want this transaction to persist after a crash, it has to get to disk.This has no effect on standard MySQL replication from this instance, since MySQL replication is asynchronous.What about semi-sync MySQL replication?It&amp;#8217;s actually much worse than Galera.  As I illustrated in a blog post last year, semi-sync must serialize all transactions and wait for them one at a time.  So, Callaghan&amp;#8217;s law applied to semi-sync is:[On a semi-sync replication master] you can&amp;#8217;t commit (at all) more than once per RTT. Applied to a Galera clusterIn the cluster we&amp;#8217;re protecting the data as well, though not by ensuring it goes to disk (though you can do that).  We protect the data by ensuring it gets to every node in the cluster.But why every node and not just a quorum?  Well, it turns out transaction ordering really, really matters (really!).  By enforcing replication to all nodes, we can (simultaneously) establish global ordering for the transaction, so by the time the original node gets acknowledgement of the transaction back from all the other nodes, a GTID will also (by design) be established.  We&amp;#8217;ll never end up with non-deterministic ordering of transactions as a result.So this brings us back to Callaghan&amp;#8217;s law for Galera.  We must have group communication to replicate and establish global ordering for every transaction, and the expense of doing that for Galera is approximately one RTT between the two nodes in the cluster that are furthest apart (regardless of where the commit comes from!).  The least amount of data we can change in Innodb at a time is a single row, so the most any single row can be modified cluster-wide is once per RTT.What about WAN clusters?Callaghan&amp;#8217;s law applies to WAN clusters as well.  LANs usually have sub-millisecond RTTs.  WANs usually have anywhere from a few ms up to several hundred.  This really will open a large window where rows won&amp;#8217;t be able to be updated more than just a few times a second at best.Some things the rule does not mean on GaleraIt does NOT mean you can&amp;#8217;t modify different rows simultaneously.  You can.It does NOT mean you can&amp;#8217;t modify data on multiple cluster nodes simultaneously.  You can.It does NOT set an lower bound on performance, only a upper bound.  The best performance you can expect is modifying a given row once per RTT, it could get slower if apply times start to lag.So what about my application?Think about your workload.  How frequently do you update any given row?  We call rows that are updated heavily &amp;#8220;hotspots&amp;#8220;.Examples of hotspotsExample 1: Your application is an online game and you keep track of global achievement statistics in a single table with a row for each stat; there are just a few hundred rows.  When a player makes an achievement, your application updates this table with a statement like this:UPDATE achievements SET count = count + 1 where achievement = 'killed_troll';How many players might accomplish this achievement at the same time?Example 2: You have users and groups in your application.  These are maintained in separate tables and there also exists a users_groups table to define the relationship between them.  When someone joins a group, you run a transaction that adds the relationship row to users_groups, but also updates groups with some metadata:BEGIN;
INSERT INTO users_groups (user_id, group_id) VALUES (100, 1);
UPDATE groups SET last_joined=NOW(), last_user_id=100 WHERE id=1;
COMMIT;How often might multiple users join the same group?ResultsIn both of the above examples you can imagine plenty of concurrent clients attempting to modify the same record at once.  But what will actually happen to the clients who try to update the same row within the same RTT?  This depends on which node in the cluster the writes are coming from:From the same node: This will behave just like standard Innodb.  The first transaction will acquire the necessary row locks while it commits (which will take the 1 RTT).  The other transactions will lock wait until the lock(s) they need are available.  The application just waits in those cases.From other nodes: First to commit wins.  The others that try to commit AFTER the first and while the first is still in the local apply queue on their nodes will get a deadlock error.So, the best case (which may not be best for your application database throughput) will be more write latency into the cluster.  The worst case is that your transactions won&amp;#8217;t even commit and you have to take some action you normally wouldn&amp;#8217;t have had to do.WorkaroundsIf your hotspots were really bad in standalone Innodb, you might consider relaxing the fsync:  set innodb_flush_log_at_trx_commit to something besides 1 and suddenly you can update much faster.  I see this tuning very frequently for &amp;#8220;performance&amp;#8221; reasons when data durability isn&amp;#8217;t as crucial.  This is fine as long as you weigh both options carefully.But in Galera you cannot relax synchronous replication.  You can&amp;#8217;t change the law, you can only adapt around it, but how might you do that ?Write to one nodeIf your issue is really the deadlock errors and not so much the waiting, you could simply send all your writes to one node.  This should prevent the deadlock errors, but will not change the lock waiting that your application will need to do for hotspots.wsrep_retry_autocommitIf your hotspots are all updates with autocommits, you can rely on wsrep_retry_autocommit to auto-retry the transactions for you.  However, each autocommit is retried only the number of times specified by this variable (default is 1 retry).  This means more waiting, and after the limit is exceeded you will still get the deadlock error.This is not implemented for full BEGIN &amp;#8230; COMMIT multi-statement transactions since it cannot be assumed that those are not applying application logic in between the statements that is not safe to retry after the database state changes.retry deadlocksNow we start to get into (*gasp*) territory where your application needs to be modified.  Generally if you use Innodb, you should be able to handle deadlock errors in your application.  Raise your hands if your application has that logic (I usually get less than 5 people who do out of 100).But, what to do?  Retrying automatically, or giving your end user a chance to retry manually are typical answers.  However, this means more latency waiting for a write to go through, and possibly some poor user experience.batch writesInstead of updating global counters one at a time (from Example 1, above), how about maintaining the counter in memcache or redis and only flushing to the database periodically?if( $last_count % 100 == 0 ) {
  $db-&amp;gt;do( &quot;UPDATE achievements SET count = $last_count where achievement = 'killed_troll'&quot;;
}change your schemaIn Example 2, above, how above moving the &amp;#8216;joined&amp;#8217; column to the users_groups table so we don&amp;#8217;t need to update the parent group row so often?INSERT INTO users_groups (user_id, group_id, joined) VALUES (100, 1, NOW());ConclusionChoosing a system to replicate your data to a distributed system requires tradeoffs.  Most of us are used to the tradeoffs we take when deploying conventional stand-alone MySQL Innodb with asynchronous slaves.  We may not think about the tradeoffs, but we&amp;#8217;re making them (anyone obsessively testing slave position to ensure it&amp;#8217;s caught up with the master?).Synchronous replication with PXC and Galera is no different in that there are trade-offs, they just aren&amp;#8217;t what we commonly expect.If Callaghan&amp;#8217;s law is going to cause you trouble and you are not prepared to adapt to work with it, PXC/Galera Synchronous replication is probably not right for you.The post Is Synchronous Replication right for your app? appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<p>I talk with lot of people who are really interested in <a href="http://www.percona.com/software/percona-xtradb-cluster" target="_blank">Percona XtraDB Cluster</a> (PXC) and mostly they are interested in PXC as a high-availability solution.  But, what they tend not to think too much about is if moving from async to synchronous replication is right for their application or not.</p><h1>Facts about Galera replication</h1><p>There&#8217;s a lot of different facts about Galera that come into play here, and it isn&#8217;t always obvious how they will affect your database workload.  For example:</p><ul><li>Transaction commit takes approximately the worst packet round trip time (RTT) between any two nodes in your cluster.</li><li>Transaction apply on slave nodes is still asynchronous from client commit (except on the original node where the transaction is committed)</li><li><span>Galera prevents writing conflicts to these pending transactions while they are inflight in the form of <a href="http://www.mysqlperformanceblog.com/2012/11/20/understanding-multi-node-writing-conflict-metrics-in-percona-xtradb-cluster-and-galera/">deadlock errors</a>.  (This is actually a form of <a href="http://en.wikipedia.org/wiki/Eventual_consistency">Eventual Consistency</a> where the client is forced to correct the problem before it can commit.  It is NOT the typical form of Eventual Consistency, known as asynchronous repair, that most people think of).<br
/> </span></li></ul><h1>Callaghan&#8217;s Law</h1><p>But what does that all actually mean?  Well, at <a href="http://www.percona.com/live/mysql-conference-2013/">the Percona Live conference</a> a few weeks ago I heard a great maxim that really helps encapsulate a lot of this information and puts it into context with your application workload:</p><blockquote><p><em>[In a Galera cluster] a given row can&#8217;t be modified more than once per RTT</em></p></blockquote><p>This was attributed to <a href="https://www.percona.com/live/mysql-conference-2013/users/mark-callaghan-0">Mark Callaghan</a> from Facebook by <a href="http://www.percona.com/live/mysql-conference-2012/users/ayurchen">Alexey Yurchenko</a> from <a href="http://www.codership.com">Codership</a> at <a href="http://www.percona.com/live/mysql-conference-2013/sessions/how-understand-galera-replication-0">his conference talk</a>.  Henceforth this will be known as &#8220;Callaghan&#8217;s law&#8221; in Galera circles forever, though Mark didn&#8217;t immediately recall saying it.</p><h2>Applied to a standalone Innodb instance</h2><p>Let&#8217;s break it down a bit.  Our unit of locking in Innodb is a single row (well, the PRIMARY KEY index entry for that row).  This means typically on a single Innodb node we can have all sorts modifications floating around as long as they don&#8217;t touch the same row.  Row locks are held for modifications until the transaction commits and that takes an fsync to the redo log by default, so applying Callaghan&#8217;s law to single-server Innodb, we&#8217;d get:</p><blockquote><p><em>[On a single node Innodb server] a given row can&#8217;t be modified more than the time to fsync</em></p></blockquote><p>You can obviously relax that by simply not fsyncing every transaction (innodb_flush_log_at_trx_commit != 1), or work around it with by fsyncing to memory (Battery or capacitor-backed write cache), etc., but the principle is basically the same.  If we want this transaction to persist after a crash, it has to get to disk.</p><p>This has no effect on standard MySQL replication from this instance, since MySQL replication is asynchronous.</p><h2>What about semi-sync MySQL replication?</h2><p>It&#8217;s actually much worse than Galera.  As I illustrated in a <a href="http://www.mysqlperformanceblog.com/2012/06/14/comparing-percona-xtradb-cluster-with-semi-sync-replication-cross-wan/">blog post last year</a>, semi-sync must serialize all transactions and wait for them one at a time.  So, Callaghan&#8217;s law applied to semi-sync is:</p><blockquote><p><em>[On a semi-sync replication master] you can&#8217;t commit (at all) more than once per RTT. </em></p></blockquote><h2>Applied to a Galera cluster</h2><p>In the cluster we&#8217;re protecting the data as well, though not by ensuring it goes to disk (though you can do that).  We protect the data by ensuring it gets to every node in the cluster.</p><p>But why every node and not just a quorum?  Well, it turns out transaction ordering really, really matters (really!).  By enforcing replication to all nodes, we can (simultaneously) establish global ordering for the transaction, so by the time the original node gets acknowledgement of the transaction back from all the other nodes, a GTID will also (by design) be established.  We&#8217;ll never end up with non-deterministic ordering of transactions as a result.</p><p>So this brings us back to Callaghan&#8217;s law for Galera.  We must have group communication to replicate and establish global ordering for every transaction, and the expense of doing that for Galera is approximately one RTT between the two nodes in the cluster that are furthest apart (regardless of where the commit comes from!).  The least amount of data we can change in Innodb at a time is a single row, so the most any single row can be modified cluster-wide is once per RTT.</p><h2>What about WAN clusters?</h2><p>Callaghan&#8217;s law applies to WAN clusters as well.  LANs usually have sub-millisecond RTTs.  WANs usually have anywhere from a few ms up to several hundred.  This really will open a large window where rows won&#8217;t be able to be updated more than just a few times a second at best.</p><h2>Some things the rule does not mean on Galera</h2><ul><li><span>It does NOT mean you can&#8217;t modify different rows simultaneously.  You can.</span></li><li><span>It does NOT mean you can&#8217;t modify data on multiple cluster nodes simultaneously.  You can.</span></li><li>It does NOT set an lower bound on performance, only a upper bound.  The best performance you can expect is modifying a given row once per RTT, it could get slower if apply times start to lag.</li></ul><h1>So what about my application?</h1><p>Think about your workload.  How frequently do you update any given row?  We call rows that are updated heavily &#8220;<strong>hotspots</strong>&#8220;.</p><h2>Examples of hotspots</h2><p><em>Example 1: </em>Your application is an online game and you keep track of global achievement statistics in a single table with a row for each stat; there are just a few hundred rows.  When a player makes an achievement, your application updates this table with a statement like this:</p><pre>UPDATE achievements SET count = count + 1 where achievement = 'killed_troll';</pre><p>How many players might accomplish this achievement at the same time?</p><p><em>Example 2: </em>You have users and groups in your application.  These are maintained in separate tables and there also exists a users_groups table to define the relationship between them.  When someone joins a group, you run a transaction that adds the relationship row to users_groups, but also updates groups with some metadata:</p><pre>BEGIN;
INSERT INTO users_groups (user_id, group_id) VALUES (100, 1);
UPDATE groups SET last_joined=NOW(), last_user_id=100 WHERE id=1;
COMMIT;</pre><p>How often might multiple users join the same group?</p><h2>Results</h2><p>In both of the above examples you can imagine plenty of concurrent clients attempting to modify the same record at once.  But what will actually happen to the clients who try to update the same row within the same RTT?  This depends on which node in the cluster the writes are coming from:</p><p><em>From the same node:</em> This will behave just like standard Innodb.  The first transaction will acquire the necessary row locks while it commits (which will take the 1 RTT).  The other transactions will lock wait until the lock(s) they need are available.  The application just waits in those cases.</p><p><em>From other nodes:</em> First to commit wins.  The others that try to commit AFTER the first and while the first is still in the local apply queue on their nodes will get a deadlock error.</p><p>So, the best case (which may not be best for your application database throughput) will be more write latency into the cluster.  The worst case is that your transactions won&#8217;t even commit and you have to take some action you normally wouldn&#8217;t have had to do.</p><h2><span>Workarounds</span></h2><p>If your hotspots were really bad in standalone Innodb, you might consider relaxing the fsync:  set innodb_flush_log_at_trx_commit to something besides 1 and suddenly you can update much faster.  I see this tuning very frequently for &#8220;performance&#8221; reasons when data durability isn&#8217;t as crucial.  This is fine as long as you weigh both options carefully.</p><p>But in Galera you cannot relax synchronous replication.  You can&#8217;t change the law, you can only adapt around it, but how might you do that ?</p><h3>Write to one node</h3><p>If your issue is really the deadlock errors and not so much the waiting, you could simply send all your writes to one node.  This should prevent the deadlock errors, but will not change the lock waiting that your application will need to do for hotspots.</p><h3>wsrep_retry_autocommit</h3><p>If your hotspots are all updates with autocommits, you can rely on <a href="http://www.percona.com/doc/percona-xtradb-cluster/wsrep-system-index.html#wsrep_retry_autocommit">wsrep_retry_autocommit</a> to auto-retry the transactions for you.  However, each autocommit is retried only the number of times specified by this variable (default is 1 retry).  This means more waiting, and after the limit is exceeded you will still get the deadlock error.</p><p>This is not implemented for full BEGIN &#8230; COMMIT multi-statement transactions since it cannot be assumed that those are not applying application logic in between the statements that is not safe to retry after the database state changes.</p><h3>retry deadlocks</h3><p>Now we start to get into (*gasp*) territory where your application needs to be modified.  Generally if you use Innodb, you should be able to handle deadlock errors in your application.  Raise your hands if your application has that logic (I usually get less than 5 people who do out of 100).</p><p>But, what to do?  Retrying automatically, or giving your end user a chance to retry manually are typical answers.  However, this means more latency waiting for a write to go through, and possibly some poor user experience.</p><h3>batch writes</h3><p>Instead of updating global counters one at a time (from Example 1, above), how about maintaining the counter in memcache or redis and only flushing to the database periodically?</p><pre>if( $last_count % 100 == 0 ) {
  $db-&gt;do( "UPDATE achievements SET count = $last_count where achievement = 'killed_troll'";
}</pre><p></p><h3>change your schema</h3><p>In Example 2, above, how above moving the &#8216;joined&#8217; column to the users_groups table so we don&#8217;t need to update the parent group row so often?</p><pre>INSERT INTO users_groups (user_id, group_id, joined) VALUES (100, 1, NOW());</pre><p></p><h1>Conclusion</h1><p>Choosing a system to replicate your data to a distributed system requires tradeoffs.  Most of us are used to the tradeoffs we take when deploying conventional stand-alone MySQL Innodb with asynchronous slaves.  We may not think about the tradeoffs, but we&#8217;re making them (anyone obsessively testing slave position to ensure it&#8217;s caught up with the master?).</p><p>Synchronous replication with PXC and Galera is no different in that there are trade-offs, they just aren&#8217;t what we commonly expect.</p><p><em><strong>If Callaghan&#8217;s law is going to cause you trouble and you are not prepared to adapt to work with it, PXC/Galera Synchronous replication is probably not right for you</strong>.</em></p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/14/is-synchronous-replication-right-for-your-app/">Is Synchronous Replication right for your app?</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59642&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59642&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 14 May 2013 10:00:46 +0000</pubDate>
    <dc:creator>Jay Janssen</dc:creator>
    <category>MySQL</category>
    <category>Percona Software</category>
    <category>XtraDB Cluster</category>
    <category>async</category>
    <category>Galera replication</category>
    <category>hotspots</category>
    <category>Jay Janssen</category>
    <category>Percona XtraDB Cluster</category>
    <category>pxc</category>
    <category>Synchronous Replication</category>
  </item>

  <item>
    <title>MySQL Cluster 7.3 Improvements - Connection Thread Scalability</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-14455177.post-5238743419952321678</guid>
    <link>http://mikaelronstrom.blogspot.com/2013/05/mysql-cluster-73-improvements.html</link>
    <description>As many have noted we have released another milestone release of MySQL Cluster 7.3. One of the main features of 7.3 is obviously foreign keys. In this post I am going to describe one more feature added to MySQL Cluster in the second milestone release which is called Connection Thread Scalability.http://dev.mysql.com/tech-resources/articles/cluster-7.3-dmr2.htmlAlmost all software designed for multithreaded use cases in the 1990s have some sort of big kernel mutex, as a matter of a fact this is also true for some hyped new software written in this millenium and even in this decade. Linux had its big kernel mutex, InnoDB had its kernel mutex, MySQL server had its LOCK_open mutex. All these mutexes are characterized by the fact that these mutexes protects many things that often have no connection with each other. Most of these mutexes have been fixed by now, the Linux big kernel mutex is almost gone by now, the LOCK_open is more or less removed as a bottleneck, the InnoDB kernel mutex has been split into ten different mutexes.In MySQL Cluster we have had two types of kernel mutexes. In the data nodes the &quot;kernel mutex&quot; was actually a single-thread execution model. This model was very efficient but limited scalability. In MySQL Cluster 7.0 we extended the single threaded data nodes to be able to run up to 8 threads in parallel instead. In MySQL Cluster 7.2 we extended this to enable support of up to 32 or more threads.The &quot;kernel mutex&quot; in the NDB API we call the transporter mutex. This mutex meant that all communication from a certain process, using a specific API node, used one protected region that protected communication with all other data nodes. This mutex could in some cases be held for substantial times.This has meant that there has been limitation on how much throughput can be processed using one API node. It has been possible to process much throughputanyways using multiple API nodes per process (this is the configuration parameter ndb-cluster-connection-pool).What we have done in MySQL Cluster 7.3 is that we have fixed this bottleneck. We have split the transporter mutex and replaced it with mutexes that protects sending to a specific data node, mutexes that protects receiving from a certain data node, mutexes that protect memory buffers and mutexes that protect execution on behalf of a certain NDB API connection.This means a significant improvement of throughput per API node. If we run a benchmark with just one data node using the flexAsynch benchmark that handles around 300-400k transactions per second per API node, this improvement increases throughput by around 50%. A Sysbench benchmark for one data node is improved by a factor of 3.3x. Finally a DBT2 benchmark with one data node is improved by a factor of 7.5x.The bottleneck for an API node is that only one thread can process incoming messages for one connection between an API node and a data node. For flexAsynch there is a lot of processing of messages per node connection, it's much smaller in Sysbench and even smaller in DBT2 and thus these benchmarks see a much higher improvement due to this new feature.If we run with multiple data nodes the improvement increases even more since the connections to different data nodes from one API node are now more or less independent of each other.The feature will improve performance of applications without any changes of the application, the changes are entirely done inside the NDB API and thus improve performance both of NDB API applications as well as MySQL applications.It is still possible to use multiple API nodes for a certain client process. But the need to do so is much smaller and in many cases even removed.</description>
    <content:encoded><![CDATA[<div dir="ltr" trbidi="on">As many have noted we have released another milestone release of MySQL Cluster 7.3. One of the main features of 7.3 is obviously foreign keys. In this post I am going to describe one more feature added to MySQL Cluster in the second milestone release which is called Connection Thread Scalability.<br /><br /><a href="http://dev.mysql.com/tech-resources/articles/cluster-7.3-dmr2.html">http://dev.mysql.com/tech-resources/articles/cluster-7.3-dmr2.html</a><br /><br />Almost all software designed for multithreaded use cases in the 1990s have some sort of big kernel mutex, as a matter of a fact this is also true for some hyped new software written in this millenium and even in this decade. Linux had its big kernel mutex, InnoDB had its kernel mutex, MySQL server had its LOCK_open mutex. All these mutexes are characterized by the fact that these mutexes protects many things that often have no connection with each other. Most of these mutexes have been fixed by now, the Linux big kernel mutex is almost gone by now, the LOCK_open is more or less removed as a bottleneck, the InnoDB kernel mutex has been split into ten different mutexes.<br /><br />In MySQL Cluster we have had two types of kernel mutexes. In the data nodes the "kernel mutex" was actually a single-thread execution model. This model was very efficient but limited scalability. In MySQL Cluster 7.0 we extended the single threaded data nodes to be able to run up to 8 threads in parallel instead. In MySQL Cluster 7.2 we extended this to enable support of up to 32 or more threads.<br /><br />The "kernel mutex" in the NDB API we call the transporter mutex. This mutex meant that all communication from a certain process, using a specific API node, used one protected region that protected communication with all other data nodes. This mutex could in some cases be held for substantial times.<br /><br />This has meant that there has been limitation on how much throughput can be processed using one API node. It has been possible to process much throughput<br />anyways using multiple API nodes per process (this is the configuration parameter ndb-cluster-connection-pool).<br /><br />What we have done in MySQL Cluster 7.3 is that we have fixed this bottleneck. We have split the transporter mutex and replaced it with mutexes that protects sending to a specific data node, mutexes that protects receiving from a certain data node, mutexes that protect memory buffers and mutexes that protect execution on behalf of a certain NDB API connection.<br /><br />This means a significant improvement of throughput per API node. If we run a benchmark with just one data node using the flexAsynch benchmark that handles around 300-400k transactions per second per API node, this improvement increases throughput by around 50%. A Sysbench benchmark for one data node is improved by a factor of 3.3x. Finally a DBT2 benchmark with one data node is improved by a factor of 7.5x.<br /><br />The bottleneck for an API node is that only one thread can process incoming messages for one connection between an API node and a data node. For flexAsynch there is a lot of processing of messages per node connection, it's much smaller in Sysbench and even smaller in DBT2 and thus these benchmarks see a much higher improvement due to this new feature.<br /><br />If we run with multiple data nodes the improvement increases even more since the connections to different data nodes from one API node are now more or less independent of each other.<br /><br />The feature will improve performance of applications without any changes of the application, the changes are entirely done inside the NDB API and thus improve performance both of NDB API applications as well as MySQL applications.<br /><br />It is still possible to use multiple API nodes for a certain client process. But the need to do so is much smaller and in many cases even removed.</div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59637&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59637&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 14 May 2013 08:26:00 +0000</pubDate>
    <dc:creator>Mikael Ronstr&amp;ouml;m</dc:creator>
  </item>

  <item>
    <title>MySQL 5.6 general query log behavior change</title>
    <guid isPermaLink="false">http://mysqlblog.fivefarmers.com/?p=540</guid>
    <link>http://mysqlblog.fivefarmers.com/2013/05/13/mysql-5-6-general-query-log-behavior-change/</link>
    <description>The MySQL general query log can be a useful debugging tool, showing commands received from clients.  In versions through MySQL 5.5, you could count on the GQL to log every command it received &amp;#8211; the logging happened before parsing.  That can be helpful &amp;#8211; for example, the GQL entries might have records of somebody unsuccessfully attempting to exploit SQL injection vulnerabilities that result in syntax exceptions.
Here&amp;#8217;s a sample, which I&amp;#8217;ll run in both 5.5 and 5.6 and show the resulting GQL:
mysql&amp;gt; SELECT 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)

mysql&amp;gt; SELECT NOTHING();
ERROR 1305 (42000): FUNCTION NOTHING does not exist
mysql&amp;gt; SELECT 2;
+---+
| 2 |
+---+
| 2 |
+---+
1 row in set (0.00 sec)
In 5.5, this produces the following in the general query log:
130513 18:26:34        1 Query    SELECT 1
130513 18:26:40        1 Query    SELECT NOTHING()
130513 18:26:44        1 Query    SELECT 2
In 5.6, the same produces the following:
130425 21:53:25        1 Query    SELECT 1
130425 21:53:35        1 Query    SELECT 2
The behavior hasn&amp;#8217;t changed between 5.5 and 5.6 with respect to successfully-parsed, but unauthorized statements.  With the limited-privilege anonymous user account, I issued the following against both 5.5 and 5.6 servers:
mysql&amp;gt; SHOW GRANTS;
+--------------------------------------+
| Grants for @localhost                |
+--------------------------------------+
| GRANT USAGE ON *.* TO ''@'localhost' |
+--------------------------------------+
1 row in set (0.00 sec)

mysql&amp;gt; SELECT * FROM mysql.user;
ERROR 1142 (42000): SELECT command denied to user ''@'localhost' for table 'user'
The general query log for both 5.5 and 5.6 recorded the attempt to SELECT from mysql.user system table:
130513 18:31:10        3 Query    SHOW GRANTS
130513 18:31:11        3 Query    SELECT * FROM mysql.user
The documentation doesn&amp;#8217;t explicitly note this behavior change (I filed Bug#68937 to include this in the manual) &amp;#8211; it talks about the password-masking feature which triggered this behavioral change, though (and this page also documents which statements are rewritten).  In order to mask passwords in log files, the log entries have to be written after they are parsed.  When I issue the following statement in 5.6, the password is masked in the general query log:
mysql&amp;gt; SET PASSWORD = PASSWORD('test');
Query OK, 0 rows affected (0.00 sec)
Here&amp;#8217;s the corresponding general query log entry:
130513 18:45:59        2 Query    SET PASSWORD FOR `root`=&amp;lt;secret&amp;gt;
That&amp;#8217;s much appreciated behavior &amp;#8211; there&amp;#8217;s typically no reason to expose passwords in logs.  For those who do need this temporarily for diagnostic purposes, there&amp;#8217;s a &amp;#8211;log-raw option which logs before parsing, just like in 5.5.  This means that plain-text passwords as well as statements with syntax errors get logged.  Here&amp;#8217;s the result in 5.6 with &amp;#8211;log-raw enabled:
130513 18:43:10        1 Query    SELECT NOTHING()
Unfortunately, there&amp;#8217;s no status variable to tell a DBA whether or not they are protected by the new 5.6 behavior, or whether the running server has been started with &amp;#8211;log-raw to override it and is still logging plain-text passwords.  I filed Bug#68936 to address that.  I would also love to allow users (with appropriate permissions) the ability to change this configuration option without restart of MySQL Server, but it&amp;#8217;s probably not something that will need &amp;#8211; or want &amp;#8211; to be changed in a production environment where downtime is critical.
I&amp;#8217;m happy to see plain-text passwords removed from logs in 5.6, and hope that this post helps clarify associated behavioral changes related to the general query log in 5.6.
&amp;nbsp;</description>
    <content:encoded><![CDATA[<p>The MySQL general query log can be a useful debugging tool, showing commands received from clients.  In versions through MySQL 5.5, you could count on the GQL to log every command it received &#8211; the logging happened before parsing.  That can be helpful &#8211; for example, the GQL entries might have records of somebody unsuccessfully attempting to exploit SQL injection vulnerabilities that result in syntax exceptions.</p>
<p>Here&#8217;s a sample, which I&#8217;ll run in both 5.5 and 5.6 and show the resulting GQL:<span></span></p>
<pre>mysql&gt; SELECT 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)

mysql&gt; SELECT NOTHING();
ERROR 1305 (42000): FUNCTION NOTHING does not exist
mysql&gt; SELECT 2;
+---+
| 2 |
+---+
| 2 |
+---+
1 row in set (0.00 sec)</pre>
<p>In 5.5, this produces the following in the general query log:</p>
<pre>130513 18:26:34        1 Query    SELECT 1
130513 18:26:40        1 Query    SELECT NOTHING()
130513 18:26:44        1 Query    SELECT 2</pre>
<p>In 5.6, the same produces the following:</p>
<pre>130425 21:53:25        1 Query    SELECT 1
130425 21:53:35        1 Query    SELECT 2</pre>
<p>The behavior hasn&#8217;t changed between 5.5 and 5.6 with respect to successfully-parsed, but unauthorized statements.  With the limited-privilege anonymous user account, I issued the following against both 5.5 and 5.6 servers:</p>
<pre>mysql&gt; SHOW GRANTS;
+--------------------------------------+
| Grants for @localhost                |
+--------------------------------------+
| GRANT USAGE ON *.* TO ''@'localhost' |
+--------------------------------------+
1 row in set (0.00 sec)

mysql&gt; SELECT * FROM mysql.user;
ERROR 1142 (42000): SELECT command denied to user ''@'localhost' for table 'user'</pre>
<p>The general query log for both 5.5 and 5.6 recorded the attempt to SELECT from mysql.user system table:</p>
<pre>130513 18:31:10        3 Query    SHOW GRANTS
130513 18:31:11        3 Query    SELECT * FROM mysql.user</pre>
<p>The <a href="http://dev.mysql.com/doc/refman/5.6/en/query-log.html">documentation</a> doesn&#8217;t explicitly note this behavior change (I filed <a href="http://bugs.mysql.com/bug.php?id=68937" target="_blank">Bug#68937</a> to include this in the manual) &#8211; it talks about the password-masking feature which triggered this behavioral change, though (and <a href="http://dev.mysql.com/doc/refman/5.6/en/password-logging.html" target="_blank">this page</a> also documents which statements are rewritten).  In order to mask passwords in log files, the log entries have to be written after they are parsed.  When I issue the following statement in 5.6, the password is masked in the general query log:</p>
<pre>mysql&gt; SET PASSWORD = PASSWORD('test');
Query OK, 0 rows affected (0.00 sec)</pre>
<p>Here&#8217;s the corresponding general query log entry:</p>
<pre>130513 18:45:59        2 Query    SET PASSWORD FOR `root`=&lt;secret&gt;</pre>
<p>That&#8217;s much appreciated behavior &#8211; there&#8217;s typically no reason to expose passwords in logs.  For those who do need this temporarily for diagnostic purposes, there&#8217;s a<a href="http://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_log-raw" target="_blank"> &#8211;log-raw option</a> which logs before parsing, just like in 5.5.  This means that plain-text passwords as well as statements with syntax errors get logged.  Here&#8217;s the result in 5.6 with &#8211;log-raw enabled:</p>
<pre>130513 18:43:10        1 Query    SELECT NOTHING()</pre>
<p>Unfortunately, there&#8217;s no status variable to tell a DBA whether or not they are protected by the new 5.6 behavior, or whether the running server has been started with &#8211;log-raw to override it and is still logging plain-text passwords.  I filed <a href="http://bugs.mysql.com/68936" target="_blank">Bug#68936</a> to address that.  I would also love to allow users (with appropriate permissions) the ability to change this configuration option without restart of MySQL Server, but it&#8217;s probably not something that will need &#8211; or want &#8211; to be changed in a production environment where downtime is critical.</p>
<p>I&#8217;m happy to see plain-text passwords removed from logs in 5.6, and hope that this post helps clarify associated behavioral changes related to the general query log in 5.6.</p>
<p>&nbsp;</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59636&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59636&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 14 May 2013 02:05:42 +0000</pubDate>
    <dc:creator>Todd Farmer</dc:creator>
    <category>MySQL</category>
    <category>MySQL 5.6</category>
    <category>security</category>
  </item>

  <item>
    <title>Some LSI 9211-8i issues on Windows and Linux</title>
    <guid isPermaLink="false">http://swanhart.livejournal.com/136355.html</guid>
    <link>http://swanhart.livejournal.com/136355.html</link>
    <description>
tl;dr:
Make sure you flash an LSI-9211 to IT firmware rev#14 to get it to work 
with Linux and SSD trim.  You may have to downgrade from newer firmware
to older firmware to get the card to work.
Finding a SATA III controller with more than one PCI-e laneAfter a recent hardware issue I decided to upgrade my computer to use new Intel 520 120MB SSD drives in RAID for improved performance. &amp;nbsp;The motherboard I use (an ASUS Rampage III extreme) has a Marvel SATA III controller with two ports, but I discovered that it is connected via only a single PCI-e lane (each lane can do at most 400MB/sec*). &amp;nbsp;This means that it can&amp;#39;t effectively support even a single Intel 520 because one device can saturate the SATA III bus (An Intel 520 is rated at up to 550MB/sec sequential write).So I went on a quest for a new SATA 3 controller. &amp;nbsp; To Frys! I exclaimed. &amp;nbsp;But unfortunately, all the PCI-e 2.x SATA III controllers used a single lane! &amp;nbsp;(These cards also feature RAID which is a double wtf). &amp;nbsp;Well, having been thwarted by my Frys run (I could have upgraded the motherboard, but I want to wait for the next generation of processors with DDR4 ram) I went to Central Computers in Mountain View. &amp;nbsp;There I found LSI PCI-e HBAs.  LSI HBAs use 8 PCI-e lanes. &amp;nbsp;I decided to get an LSI 9211-8i for a little less than they sell on NewEgg. &amp;nbsp;This is a RAID controller, and I specifically told the technician that I wanted a RAID controller that supported TRIM and he said LSI supports trim**. &amp;nbsp;So I laid down my money and headed home.Strange Windows 7 Professional 64 bit performanceI booted into Windows 7 and performance on AS-SSD (a simple benchmark utility targeted at SSD performance) for the drive was horrible. &amp;nbsp;So horrible the test could not complete.  During the test the performance is reported to be pegged at 98 IOPS.  &amp;nbsp;To compare, the same test, same drive, same OS, but different card: 13000 IOPS. &amp;nbsp;13K IOPS is low for the drive but it was an old sata 2 card. &amp;nbsp;Regardless, it shows the drive can do way better than the 98 IOPS that the LSI card reported while attempting to complete the test. &amp;nbsp;I messed around with this for quite awhile, pulling out hair. &amp;nbsp;I eventually tried upgrading the card to R16 firmware. &amp;nbsp;Same issue. &amp;nbsp;I figured that maybe there was some sort of windows weirdness  so I decided to test Linux.  I have contacted LSI about the issue with AS-SSD to see if there is possibly a driver issue to blame.Linux and the case of the mysterious hanging mkfs.ext4I installed CentOS 6.4 minimal on another 32GB OCZ SSD I had lying around. &amp;nbsp;CentOS found the LSI card just fine. &amp;nbsp;I could run a `dd` on the Intel 520 drives and they could do 500MB/sec+ sequential write. &amp;nbsp;Great. &amp;nbsp;Next I tried to format a filesystem on the device using `mkfs.ext4`. &amp;nbsp;  ext4 now supports TRIM and will discard all of the blocks on a target when it creates a new filesystem. However, when I tried to create a filesystem with `mkfs.ext4`, it would simply hang at 0/X bytes discarded.  Eventually the kernel started printing messages like &quot;attempting task abort!&quot; and &quot;task abort: SUCCESS scmd&quot; into the log. &amp;nbsp;There was no way to kill `mkfs.ext4`.  I did some searching and found an old post to the OCZ forum about problems with an OCZ Vertex 3, which is sandforce based, same as the Intel 520. &amp;nbsp;When I was doing my tests, my Vertex 3 was on another SATA bus, isolated from the LSI so I think this may be SANDFORCE related. If you didn't read the post, that user upgraded to firmware R14 to fix the problem.  Unfortunately I had already upgraded to R16. &amp;nbsp;Fixing the mkfs.ext4 issueI decided to try to downflash to R14. &amp;nbsp;But of course, the flash utility won&amp;#39;t let you downgrade by default. &amp;nbsp;However, I found a workaround by using a VERY DANGEROUS mode on the controller: RESET MODE.  In order to use this function you must use the DOS flash method.  I created a USB FreeDOS boot disk.  The flash method may work from UEFI but UEFI is a PITA.  It doesn't work from the Linux flash utility or the Windows flash utility.
To place the card in RESET MODE:
DO NOT REBOOT WITH THE CARD IN THIS STATE OR YOU WILL HAVE TO RMA THE CARD!!!!!
C:\sas2flsh.exe -o -e 6

Now you must flash the new firmware AND bios:
C:\&amp;gt;sas2flsh.exe -o -f FIRMWARE.bin -b BIOS.rom 

It is safe to reboot after flashing
With the LSI card flashed down to R14 I was able to create a filesystem on the device, but TRIM was not working. &amp;nbsp;/sys/block/sda/queue/discard_max_bytes was 0.  It turns out only LSI HBA initiator devices support trim. &amp;nbsp;So you can&amp;#39;t use RAID and TRIM on this card or even TRIM on non-RAID devices (JBOD). &amp;nbsp;Sales guy sold me another lemon. &amp;nbsp;Oh well, software raid 0 isn&amp;#39;t a large overhead.  Getting rid of raid (flash to IT mode)Oh bugger, sas2flsh won&amp;#39;t let you switch from IR (RAID) to IT (INITIATOR) firmware either without going into RESET mode. &amp;nbsp;Follow the same instructions above, but RESET the card then flash the IT firmware instead of IR. &amp;nbsp;The BIOS is the same in either case.Final setupI&amp;#39;m doing software RAID1 over a portion of the two Intel, swap on a portion of the OCZ, and software RAID0 over the remainder of all three. &amp;nbsp;This gives me a safe area for my OS and important files, a large high performance database test area, and the swap on the OCZ will be regarded as unused by TRIM. &amp;nbsp;This will improve garbage collection on the OCZ which was in use for some time before I bought the 520s.* You will see it quoted as 5GT/s and/or 5Gbit/sec but that is before 8b/10b encoding is applied for the data transfer over the bushttp://en.wikipedia.org/wiki/8b/10b_encoding** Turns out they only support trim for HBA Initiators, not HBA RAID.  You can flash to IT firmware though.  See the post.***&amp;nbsp;This post isn&amp;#39;t MySQL specific.</description>
    <content:encoded><![CDATA[<pre>
tl;dr:
Make sure you flash an LSI-9211 to IT firmware rev#14 to get it to work 
with Linux and SSD trim.  You may have to downgrade from newer firmware
to older firmware to get the card to work.
</pre><br /><a name="cutid1"></a><a name='cutid1-end'></a><br /><h1>Finding a SATA III controller with more than one PCI-e lane</h1><br />After a recent hardware issue I decided to upgrade my computer to use new Intel 520 120MB SSD drives in RAID for improved performance. &nbsp;The motherboard I use (an ASUS Rampage III extreme) has a Marvel SATA III controller with two ports, but I discovered that it is connected via only a single PCI-e lane (each lane can do at most 400MB/sec*). &nbsp;This means that it can&#39;t effectively support even a single Intel 520 because one device can saturate the SATA III bus (An Intel 520 is rated at up to 550MB/sec sequential write).<br /><br />So I went on a quest for a new SATA 3 controller. &nbsp; To Frys! I exclaimed. &nbsp;But unfortunately, all the PCI-e 2.x SATA III controllers used a single lane! &nbsp;(These cards also feature RAID which is a double wtf). &nbsp;<br /><br />Well, having been thwarted by my Frys run (I could have upgraded the motherboard, but I want to wait for the next generation of processors with DDR4 ram) I went to Central Computers in Mountain View. &nbsp;There I found LSI PCI-e HBAs.  LSI HBAs use 8 PCI-e lanes. &nbsp;I decided to get an LSI 9211-8i for a little less than they sell on NewEgg. &nbsp;This is a RAID controller, and I specifically told the technician that I wanted a RAID controller that supported TRIM and he said LSI supports trim**. &nbsp;So I laid down my money and headed home.<br /><br /><h1>Strange Windows 7 Professional 64 bit performance</h1><br />I booted into Windows 7 and performance on AS-SSD (a simple benchmark utility targeted at SSD performance) for the drive was horrible. &nbsp;So horrible the test could not complete.  During the test the performance is reported to be pegged at 98 IOPS.  &nbsp;To compare, the same test, same drive, same OS, but different card: 13000 IOPS. &nbsp;13K IOPS is low for the drive but it was an old sata 2 card. &nbsp;Regardless, it shows the drive can do way better than the 98 IOPS that the LSI card reported while attempting to complete the test. &nbsp;I messed around with this for quite awhile, pulling out hair. &nbsp;I eventually tried upgrading the card to R16 firmware. &nbsp;Same issue. &nbsp;I figured that maybe there was some sort of windows weirdness  so I decided to test Linux.  I have contacted LSI about the issue with AS-SSD to see if there is possibly a driver issue to blame.<br /><br /><h1>Linux and the case of the mysterious hanging mkfs.ext4</h1><br />I installed CentOS 6.4 minimal on another 32GB OCZ SSD I had lying around. &nbsp;CentOS found the LSI card just fine. &nbsp;I could run a `dd` on the Intel 520 drives and they could do 500MB/sec+ sequential write. &nbsp;Great. &nbsp;Next I tried to format a filesystem on the device using `mkfs.ext4`. &nbsp;  ext4 now supports TRIM and will discard all of the blocks on a target when it creates a new filesystem. However, when I tried to create a filesystem with `mkfs.ext4`, it would simply hang at 0/X bytes discarded.  Eventually the kernel started printing messages like "attempting task abort!" and "task abort: SUCCESS scmd" into the log. &nbsp;<br /><br />There was no way to kill `mkfs.ext4`.  <br /><br />I did some searching and found <a href="http://www.ocztechnologyforum.com/forum/showthread.php?105460-Vertex3-on-LSI-2118-8i-crashed-on-Linux-mkfs-solution" rel="nofollow">an old post to the OCZ forum</a> about problems with an OCZ Vertex 3, which is sandforce based, same as the Intel 520. &nbsp;When I was doing my tests, my Vertex 3 was on another SATA bus, isolated from the LSI so I think this may be SANDFORCE related. <br /><br />If you didn't read the post, that user upgraded to firmware R14 to fix the problem.  Unfortunately I had already upgraded to R16. &nbsp;<br /><br /><h1>Fixing the mkfs.ext4 issue</h1><br />I decided to try to downflash to R14. &nbsp;But of course, the flash utility won&#39;t let you downgrade by default. &nbsp;However, I found a workaround by using a VERY DANGEROUS mode on the controller: RESET MODE.  In order to use this function you must use the DOS flash method.  I created a USB FreeDOS boot disk.  The flash method may work from UEFI but UEFI is a PITA.  It doesn't work from the Linux flash utility or the Windows flash utility.<br /><br /><pre>
To place the card in <i>RESET MODE</i>:
DO NOT REBOOT WITH THE CARD IN THIS STATE OR YOU WILL HAVE TO RMA THE CARD!!!!!
C:\sas2flsh.exe -o -e 6

Now you must flash the new firmware AND bios:
C:\&gt;sas2flsh.exe -o -f FIRMWARE.bin -b BIOS.rom 

<b>It is safe to reboot after flashing</b>
</pre><br /><br />With the LSI card flashed down to R14 I was able to create a filesystem on the device, but TRIM was not working. &nbsp;/sys/block/sda/queue/discard_max_bytes was 0.  <br /><br />It turns out only LSI HBA initiator devices support trim. &nbsp;So you can&#39;t use RAID and TRIM on this card or even TRIM on non-RAID devices (JBOD). &nbsp;Sales guy sold me another lemon. &nbsp;Oh well, software raid 0 isn&#39;t a large overhead.  <br /><h1>Getting rid of raid (flash to IT mode)</h1><br />Oh bugger, sas2flsh won&#39;t let you switch from IR (RAID) to IT (INITIATOR) firmware either without going into RESET mode. &nbsp;Follow the same instructions above, but RESET the card then flash the IT firmware instead of IR. &nbsp;The BIOS is the same in either case.<br /><br /><h1>Final setup</h1><br />I&#39;m doing software RAID1 over a portion of the two Intel, swap on a portion of the OCZ, and software RAID0 over the remainder of all three. &nbsp;This gives me a safe area for my OS and important files, a large high performance database test area, and the swap on the OCZ will be regarded as unused by TRIM. &nbsp;This will improve garbage collection on the OCZ which was in use for some time before I bought the 520s.<br /><br /><br />* You will see it quoted as 5GT/s and/or 5Gbit/sec but that is before 8b/10b encoding is applied for the data transfer over the bus<br /><a href="http://en.wikipedia.org/wiki/8b/10b_encoding" rel="nofollow">http://en.wikipedia.org/wiki/8b/10b_encoding</a><br /><br />** Turns out they only support trim for HBA Initiators, not HBA RAID.  You can flash to IT firmware though.  See the post.<br /><br />***&nbsp;This post isn&#39;t MySQL specific.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59635&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59635&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 14 May 2013 01:28:54 +0000</pubDate>
    <dc:creator>Justin Swanhart</dc:creator>
    <category>hba</category>
    <category>mlc</category>
    <category>linux</category>
    <category>raid</category>
    <category>vertex</category>
    <category>trim</category>
    <category>ssd</category>
    <category>intel 520</category>
    <category>ocz</category>
    <category>target</category>
    <category>mkfs.ext4</category>
    <category>initiator</category>
    <category>firmware</category>
    <category>hang</category>
  </item>

  <item>
    <title>The ARCHIVE Storage Engine</title>
    <guid isPermaLink="false">http://www.flamingspork.com/blog/?p=3329</guid>
    <link>http://www.flamingspork.com/blog/2013/05/14/the-archive-storage-engine/?utm_source=rss&amp;amp;utm_medium=rss&amp;amp;utm_campaign=the-archive-storage-engine</link>
    <description>I wonder how much longer the ARCHIVE storage engine is going to ship with MySQL&amp;#8230;. I think I&amp;#8217;m the last person to actually fix a bug in it, and that was, well, a good number of years ago now. It was created to solve a simple problem: write once read hardly ever. Useful for logs and the like. A zlib stream of rows in a file.
You can actually easily beat ARCHIVE for INSERT speed with a non-indexed MyISAM table, and with things like TokuDB around you can probably get pretty close to compression while at the same time having these things known as &amp;#8220;indexes&amp;#8221;.
ARCHIVE for a long time held this niche though and was widely and quietly used (and likely still is). It has the great benefit of being fairly lightweight &amp;#8211; it&amp;#8217;s only about 2500 lines of code (1130 if you exclude azio.c, the slightly modified gzio.c from zlib).
It also use the table discovery mechanism that NDB uses. If you remove the FRM file for an ARCHIVE table, the ARCHIVE storage engine will extract the copy it keeps to replace it. You can also do consistent backups with ARCHIVE as it&amp;#8217;s an append-only engine. The ARCHIVE engine was certainly the simplest example code of this and a few other storage engine API things.
I&amp;#8217;d love to see someone compare storage space and performance of ARCHIVE against TokuDB and InnoDB (hint hint, the Internet should solve this for me).</description>
    <content:encoded><![CDATA[<p>I wonder how much longer the ARCHIVE storage engine is going to ship with MySQL&#8230;. I think I&#8217;m the last person to actually fix a bug in it, and that was, well, a good number of years ago now. It was created to solve a simple problem: write once read hardly ever. Useful for logs and the like. A zlib stream of rows in a file.</p>
<p>You can actually easily beat ARCHIVE for INSERT speed with a non-indexed MyISAM table, and with things like TokuDB around you can probably get pretty close to compression while at the same time having these things known as &#8220;indexes&#8221;.</p>
<p>ARCHIVE for a long time held this niche though and was widely and quietly used (and likely still is). It has the great benefit of being fairly lightweight &#8211; it&#8217;s only about 2500 lines of code (1130 if you exclude azio.c, the slightly modified gzio.c from zlib).</p>
<p>It also use the table discovery mechanism that NDB uses. If you remove the FRM file for an ARCHIVE table, the ARCHIVE storage engine will extract the copy it keeps to replace it. You can also do consistent backups with ARCHIVE as it&#8217;s an append-only engine. The ARCHIVE engine was certainly the simplest example code of this and a few other storage engine API things.</p>
<p>I&#8217;d love to see someone compare storage space and performance of ARCHIVE against TokuDB and InnoDB (hint hint, the Internet should solve this for me).</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59634&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59634&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 14 May 2013 00:41:06 +0000</pubDate>
    <dc:creator>Stewart Smith</dc:creator>
    <category>code</category>
    <category>mysql</category>
    <category>archive</category>
    <category>innodb</category>
    <category>tokudb</category>
  </item>

  <item>
    <title>Delayed row-based replication with large tables lacking a primary key</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-6551499576288463009.post-4001157874945337614</guid>
    <link>http://joshuaprunier.blogspot.com/2013/05/delayed-row-based-replication-on-large.html</link>
    <description>I configure all our master databases to use row-based binary logging where I work. In my opinion it is a much safer option than statement-based replication. The advantages and disadvantages of both types of MySQL replication are detailed in the online documentation&amp;nbsp;here. You can't view the events a slave is applying directly with 'show processlist' but by issuing 'show open tables where in use' you can detect what table is receiving the attention of the SQL thread. If you need more information the mysqlbinlog command must be used to decode the slaves relay logs or masters binary logs.Our developers often change a lot of rows with a single update statement. This usually results in some reasonable replication lag on downstream slaves.&amp;nbsp;Occasionally&amp;nbsp;the lag continues to grow and eventually nagios complains. Investigating the lag I sometimes discover the root of the problem is due to millions of rows updated on a table with no primary key. Putting a primary key constraint on a table is just good practice, especially on InnoDB tables. This is really necessary for any large table that will be replicated.To show what replication is actually doing I have cloned the sakila.film table, omitting the indexes, inserted all its rows and finally updated the description column for all 1,000 rows in the new table.I have edited the output of mysqlbinlog to only show the entries related to the first row created by the insert and update&amp;nbsp;statements&amp;nbsp;above. The&amp;nbsp;@ symbol followed by a number is a mapping to the columns in the table. So&amp;nbsp;@1=film_id,&amp;nbsp;@2=title, @3=description and so on. Note that the update statement records a before and after picture of the row. This is can be used in a pinch to fix mistaken updates if the damage is small instead of having to restore from backups.So row-based replication is performing as named and creating a binary log event for each row affected. My single insert and update statement on the master then became 1,000 separate events on the slave.Digging in to the MySQL source code I was unable to confirm exactly how the SQL thread applies relay log events on a slave. I assume it is similar to what happens when a normal update statement is executed on a table with no indexes. The server must perform a full table scan to locate a single row. For a table with a million plus rows a million full table scans is expensive! A primary key or suitable unique index will prevent this type of problem.</description>
    <content:encoded><![CDATA[I configure all our master databases to use row-based binary logging where I work. In my opinion it is a much safer option than statement-based replication. The advantages and disadvantages of both types of MySQL replication are detailed in the online documentation&nbsp;<a href="https://dev.mysql.com/doc/refman/5.5/en/replication-sbr-rbr.html" rel="nofollow" target="_blank">here</a>. You can't view the events a slave is applying directly with <i><b>'show processlist'</b></i> but by issuing <i><b>'show open tables where in use'</b></i> you can detect what table is receiving the attention of the SQL thread. If you need more information the mysqlbinlog command must be used to decode the slaves relay logs or masters binary logs.<br /><br />Our developers often change a lot of rows with a single update statement. This usually results in some reasonable replication lag on downstream slaves.&nbsp;Occasionally&nbsp;the lag continues to grow and eventually nagios complains. Investigating the lag I sometimes discover the root of the problem is due to millions of rows updated on a table with no primary key. Putting a primary key constraint on a table is just good practice, especially on InnoDB tables. This is really necessary for any large table that will be replicated.<br /><br />To show what replication is actually doing I have cloned the sakila.film table, omitting the indexes, inserted all its rows and finally updated the description column for all 1,000 rows in the new table.<br /><br /><br /><br />I have edited the output of mysqlbinlog to only show the entries related to the first row created by the insert and update&nbsp;statements&nbsp;above. The&nbsp;@ symbol followed by a number is a mapping to the columns in the table. So&nbsp;@1=film_id,&nbsp;@2=title, @3=description and so on. Note that the update statement records a before and after picture of the row. This is can be used in a pinch to fix mistaken updates if the damage is small instead of having to restore from backups.<br /><br /><br /><br />So row-based replication is performing as named and creating a binary log event for each row affected. My single insert and update statement on the master then became 1,000 separate events on the slave.<br /><br />Digging in to the MySQL source code I was unable to confirm exactly how the SQL thread applies relay log events on a slave. I assume it is similar to what happens when a normal update statement is executed on a table with no indexes. The server must perform a full table scan to locate a single row. For a table with a million plus rows a million full table scans is expensive! A primary key or suitable unique index will prevent this type of problem.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59641&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=59641&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 13 May 2013 22:41:00 +0000</pubDate>
    <dc:creator>Joshua Prunier</dc:creator>
    <category>rbr</category>
    <category>primary key</category>
    <category>mysql</category>
    <category>innodb</category>
    <category>replication</category>
  </item>

  <item>
    <title>How to pick indexes is the same for MongoDB as mySQL</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-31421954.post-2736616565291135062</guid>
    <link>http://mysqldba.blogspot.com/2013/05/how-to-pick-indexes-is-same-for-mongodb.html</link>
    <description>I recently went to MongoDB Days, a conference about everything MongoDB in SF. Starting my career as a Systems Programmer then Web Developer, MySQL DB[Admin|Architect], to Software|System Architecture I like to keep an open mind about new technology and trends. When you work with a lot of different languages, and technology you find out that it’s basically the same Science from about 40 years ago.An index in MongoDB is like an index in mySQL since a Btree is a Btree regardless of what application uses it. Just like with mySQL the best performance improvement for an application using MongoDB as a datastore is adding the correct indexes.To create an index in MongoDB:db.&amp;lt;tableName&amp;gt;.ensureIndex({ col#1:1, col#2:-1, col#3:1 }); // note 1 means ASC -1 means DESCMongoDB follows the same left-most-prefix rule meaningcol#1, col#2, col#3 is an indexcol#1, col#2 is an indexcol#1 is an indexcol#2, col#3 IS NOT AN INDEXSo, just like with mySQL for ONE compound index you get a total of THREE indexes if you follow the left-most-prefix rule, the columns from left to right (in order) in a compound index is an index.MongoDB also gets a performance boost by using Covering indexes just like mySQL. What is a Covering index? Instead of reading from the datapage (or document store for MongoDB) which exists on disk your reading the data from the index which should be in memory for the most part. A common practice is to follow the left-most-prefix pattern, then add the columns which you are returning at the end of the compound index. For instanceSELECT photoId from Photos WHERE userId=? AND dateCreate=? AND privacy=?The index in mySQL I would make isALTER TABLE Photos ADD INDEX `userId-dateCreate-privacy-photoId` (userId,dateCreate,privacy,photoId)Thus following the left-most-prefix of a compound index I have an index onuserId, dateCreate, privacy, photoIduserId, dateCreate, privacyuserId, dateCreateuserIdand a Covering Index satisfied by the query above.For mongoDB its the samedb.photos.ensureIndex({ userId: 1, dateCreate: 1, privacy: 1, photoId: 1});So, in conclusion, understand the Computer Science of a Btree, Hash, LinkedList and you will understand how indexes work across technology and find that&amp;nbsp;essentially&amp;nbsp;it's the same. More info on indexes for mySQL can be found here.Also note:Explain in mongoDB is your friend just like Explain in mySQL</description>
    <content:encoded><![CDATA[<br />I recently went to MongoDB Days, a conference about everything MongoDB in SF. Starting my career as a Systems Programmer then Web Developer, MySQL DB[Admin|Architect], to Software|System Architecture I like to keep an open mind about new technology and trends. When you work with a lot of different languages, and technology you find out that it’s basically the same Science from about 40 years ago.<br /><br />An index in MongoDB is like an index in mySQL since a Btree is a Btree regardless of what application uses it. Just like with mySQL the best performance improvement for an application using MongoDB as a datastore is adding the correct indexes.<br /><br /><br />To create an index in MongoDB:<br /><br />db.&lt;tableName&gt;.ensureIndex({ col#1:1, col#2:-1, col#3:1 }); // note 1 means ASC -1 means DESC<br /><br />MongoDB follows the same left-most-prefix rule meaning<br /><br />col#1, col#2, col#3 is an index<br />col#1, col#2 is an index<br />col#1 is an index<br /><br />col#2, col#3 IS NOT AN INDEX<br /><br />So, just like with mySQL for ONE compound index you get a total of THREE indexes if you follow the left-most-prefix rule, the columns from left to right (in order) in a compound index is an index.<br /><br />MongoDB also gets a performance boost by using Covering indexes just like mySQL. What is a Covering index? Instead of reading from the datapage (or document store for MongoDB) which exists on disk your reading the data from the index which should be in memory for the most part. A common practice is to follow the left-most-prefix pattern, then add the columns which you are returning at the end of the compound index. For instance<br /><br />SELECT photoId from Photos WHERE userId=? AND dateCreate=? AND privacy=?<br /><br />The index in mySQL I would make is<br /><br />ALTER TABLE Photos ADD INDEX `userId-dateCreate-privacy-photoId` (userId,dateCreate,privacy,photoId)<br /><br />Thus following the left-most-prefix of a compound index I have an index on<br /><br />userId, dateCreate, privacy, photoId<br />userId, dateCreate, privacy<br />userId, dateCreate<br />userId<br /><br />and a Covering Index satisfied by the query above.<br /><br />For mongoDB its the same<br /><br />db.photos.ensureIndex({ userId: 1, dateCreate: 1, privacy: 1, photoId: 1});<br /><br /><br />So, in conclusion, understand the Computer Science of a <a href="http://xlinux.nist.gov/dads/HTML/btree.html" target="_blank">Btree</a>, <a href="http://xlinux.nist.gov/dads/HTML/hashtab.html" target="_blank">Hash</a>, <a href="http://xlinux.nist.gov/dads/HTML/linkedList.html" target="_blank">LinkedList</a> and you will understand how indexes work across technology and find that&nbsp;essentially&nbsp;it's the same.<a href="http://mysqldba.blogspot.com/2008/06/how-to-pick-indexes-for-order-by-and.html" target="_blank"> More info on indexes for mySQL can be found here.</a><br /><br />Also note:<br /><br /><a href="http://docs.mongodb.org/manual/reference/operator/explain/" target="_blank">Explain</a> in mongoDB is your friend just like <a href="http://dev.mysql.com/doc/refman/5.5/en/explain.html" target="_blank">Explain</a> in mySQL<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=53900&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=53900&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 13 May 2013 18:13:00 +0000</pubDate>
    <dc:creator>Dathan Pattishall</dc:creator>
  </item>

  <item>
    <title>Presenting at tomorrow’s Effective MySQL Meetup (New York City)</title>
    <guid isPermaLink="false">http://www.tokutek.com/?p=5743</guid>
    <link>http://www.tokutek.com/2013/05/presenting-at-tomorrows-effective-mysql-meetup-new-york-city/</link>
    <description>At tomorrow’s Effective MySQL Meetup, I&amp;#8217;ll be presenting “Fractal Tree Indexes : Theory and Practice (MySQL and MongoDB).&amp;#8221; The meetup is at 6:30pm Tuesday, May 14, 2013, and will be held at Alley NYC in New York City.
I’ll give an overview on how Fractal Tree® indexes work, and then get into specific product features that Fractal Trees enable in MySQL and MongoDB.  Some benchmarking and customer use-cases will be discussed, but my intent is for this to be a deep technical dive.  Several Tokutek Engineers will also be on hand, so bring any questions you&amp;#8217;ve got.
I hope to see you there!</description>
    <content:encoded><![CDATA[<p>At tomorrow’s <a href="http://www.meetup.com/EffectiveMySQL" target="_blank">Effective MySQL Meetup</a>, I&#8217;ll be presenting “<a href="http://www.meetup.com/EffectiveMySQL/events/108932962/" target="_blank">Fractal Tree Indexes : Theory and Practice (MySQL and MongoDB)</a>.&#8221; The meetup is at 6:30pm Tuesday, May 14, 2013, and will be held at <a href="http://maps.google.com/maps?q=500+7th+Ave,+17th+Floor,+New+York,+NY" target="_blank">Alley NYC</a> in New York City.</p>
<p>I’ll give an overview on how Fractal Tree® indexes work, and then get into specific product features that Fractal Trees enable in MySQL and MongoDB.  Some benchmarking and customer use-cases will be discussed, but my intent is for this to be a deep technical dive.  Several Tokutek Engineers will also be on hand, so bring any questions you&#8217;ve got.</p>
<p>I hope to see you there!</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=53899&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=53899&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 13 May 2013 17:27:51 +0000</pubDate>
    <dc:creator>Tokuview Blog</dc:creator>
    <category>TokuView</category>
    <category>InnoDB</category>
    <category>MongoDB</category>
    <category>mysql</category>
    <category>storage engine</category>
    <category>TokuDB</category>
  </item>

  <item>
    <title>Version 1.6 of mysqljsonimport now available</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-9144505959002328789.post-1010837279889934767</guid>
    <link>http://karlssonondatabases.blogspot.com/2013/05/version-16-of-mysqljsonimport-now.html</link>
    <description>Yes, finally! This took some time, but I have been so busy with other things, work-related as well as domestic, that I just haven't had the time for this. But finally version 1.6 is available for download from sourceforge. The downloads is as usual the autoconf enabled source code and PDF documentation in PDF.So, what is new you ask, well there is one big new feature which took a lot more effort than I expected. When this program was written at first, I still have the table/use use in mind. What this means is that I visioned JSON objects to be mapped to a table. This is not how programmers view JSON, but this is how data is viewed in many databases, even NoSQL ones such as MongoDB. So I wanted an import tool for simple row-structured JSON objects.Now, there is a different way to look at things, which is to see the data in the JSON file as objects, and each member as one or more rows in a table. This sort of makes up an object (yes, this is very simplistic, but you get the point). So data might look like this:[{&quot;nodename&quot;: &quot;server1&quot;&amp;nbsp;&quot;users&quot;: [{&quot;id&quot;: &quot;joe&quot;, &quot;name&quot;: &quot;Joe bloggs&quot;},&amp;nbsp; &amp;nbsp; {&quot;id&quot;: &quot;sue&quot;, &quot;name&quot;: &quot;Sue Bloggs&quot;}&amp;nbsp; ],&amp;nbsp; &quot;hosts&quot; [{&quot;name&quot;; &quot;internal&quot;, &quot;address&quot;: &quot;192.168.0.78&quot;},&amp;nbsp; &amp;nbsp; {&quot;name&quot;: &quot;external&quot;, &quot;address&quot;: &quot;11.186.19.177&quot;}&amp;nbsp; ]&amp;nbsp; },{&quot;nodename&quot;: &quot;server2&quot;&amp;nbsp;&quot;users&quot;: [{&quot;id&quot;: &quot;dick&quot;, &quot;name&quot;: &quot;Rickard Bloggs&quot;}&amp;nbsp; ],&amp;nbsp; &quot;hosts&quot; [{&quot;name&quot;; &quot;internal&quot;, &quot;address&quot;: &quot;192.168.0.75&quot;},&amp;nbsp; &amp;nbsp; {&quot;name&quot;: &quot;external&quot;, &quot;address&quot;: &quot;11.186.19.161&quot;}&amp;nbsp; ]&amp;nbsp; }]Here we would be loading into tables users&amp;nbsp;and hosts&amp;nbsp;and we would load some 7 rows in those two tables. I think what is also clear is that there is a whole bunch of stuff here to make this smarter, like other fields of the object affecting the data that is loaded, either being added to the data or to filter what data is loaded. But none of that is in place right now, for this version, this is just a simple object to table load. The old row-by-row formats are still supported (plain JSON format and Array format).Also, something cool to add is to add support for MariaDB dynamic colums. I have some ideas here, but I have yet to write the code.In addition, this release adds a --dry-run option has been added, which allows you to test config files and settings, before starting to load.I'm planning to write more about MySQL / MariaDB and JSON here eventually, and also about plain JSON, but for now, have fun, take care and happy SQLing./Karlsson</description>
    <content:encoded><![CDATA[Yes, finally! This took some time, but I have been so busy with other things, work-related as well as domestic, that I just haven't had the time for this. But finally version 1.6 is available for <a href="http://sourceforge.net/projects/mysqljson/files/mysqljsonimport/mysqljsonimport_1.6/" target="_blank">download from sourceforge</a>. The downloads is as usual the autoconf enabled source code and PDF documentation in PDF.<br /><br />So, what is new you ask, well there is one big new feature which took a lot more effort than I expected. When this program was written at first, I still have the table/use use in mind. What this means is that I visioned JSON objects to be mapped to a table. This is not how programmers view JSON, but this is how data is viewed in many databases, even NoSQL ones such as MongoDB. So I wanted an import tool for simple row-structured JSON objects.<br /><br />Now, there is a different way to look at things, which is to see the data in the JSON file as objects, and each member as one or more rows in a table. This sort of makes up an object (yes, this is very simplistic, but you get the point). So data might look like this:<br /><span>[</span><br /><span>{"nodename": "server1"</span><br /><span>&nbsp;"users": [{"id": "joe", "name": "Joe bloggs"},</span><br /><span>&nbsp; &nbsp; {"id": "sue", "name": "Sue Bloggs"}</span><br /><span>&nbsp; ],</span><br /><span>&nbsp; "hosts" [{"name"; "internal", "address": "192.168.0.78"},</span><br /><span>&nbsp; &nbsp; {"name": "external", "address": "11.186.19.177"}</span><br /><span>&nbsp; ]</span><br /><span>&nbsp; },</span><br /><span>{"nodename": "server2"</span><br /><span>&nbsp;"users": [{"id": "dick", "name": "Rickard Bloggs"}</span><br /><span>&nbsp; ],</span><br /><span>&nbsp; "hosts" [{"name"; "internal", "address": "192.168.0.75"},</span><br /><span>&nbsp; &nbsp; {"name": "external", "address": "11.186.19.161"}</span><br /><span>&nbsp; ]</span><br /><span>&nbsp; }</span><br /><span>]</span><br />Here we would be loading into tables <i>users</i>&nbsp;and <i>hosts</i>&nbsp;and we would load some 7 rows in those two tables. I think what is also clear is that there is a whole bunch of stuff here to make this smarter, like other fields of the object affecting the data that is loaded, either being added to the data or to filter what data is loaded. But none of that is in place right now, for this version, this is just a simple object to table load. The old row-by-row formats are still supported (plain JSON format and Array format).<br /><br />Also, something cool to add is to add support for MariaDB dynamic colums. I have some ideas here, but I have yet to write the code.<br /><br />In addition, this release adds a <i>--dry-run</i> option has been added, which allows you to test config files and settings, before starting to load.<br /><br />I'm planning to write more about MySQL / MariaDB and JSON here eventually, and also about plain JSON, but for now, have fun, take care and happy SQLing.<br /><br />/Karlsson<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=53898&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=53898&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 13 May 2013 17:00:00 +0000</pubDate>
    <dc:creator>Anders Karlsson</dc:creator>
    <category>mysql</category>
    <category>json</category>
    <category>mariadb</category>
  </item>

</channel>
</rss>
