<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PlanetMysql.ru - информация о СУБД MySQL &#187; mysql</title>
	<atom:link href="http://planetmysql.ru/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetmysql.ru</link>
	<description>Блог о самой популярной СУБД MySQL</description>
	<lastBuildDate>Thu, 24 May 2012 22:24:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Webinar 5/31: Building a multi-master, multi-region MySQL solution in the Cloud</title>
		<link>http://continuent-tungsten.blogspot.com/2012/05/webinar-531-building-building-multi.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=webinar-531-building-a-multi-master-multi-region-mysql-solution-in-the-cloud</link>
		<comments>http://continuent-tungsten.blogspot.com/2012/05/webinar-531-building-building-multi.html#comments</comments>
		<pubDate>Thu, 24 May 2012 22:24:00 +0000</pubDate>
		<dc:creator>Petri Virsunen</dc:creator>
				<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[Continuent Tungsten]]></category>
		<category><![CDATA[geo-cluster]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://planetmysql.ru/?guid=a1d25f8062b19674e390ec659be9de40</guid>
		<description><![CDATA[Growth is good, right? Yes, unless you are the one building and managing a MySQL database tier to handle all this growth!  

Your company has built a great new app and launched it in the cloud. And now you are seeing what many wish for: an exponential adoption of your app. 

But is your database tier really up to the job? 

What happens if your MySQL server fails?
Can you fail over to a replica]]></description>
			<content:encoded><![CDATA[Growth is good, right? Yes, unless you are the one building and managing a MySQL database tier to handle all this growth!  

Your company has built a great new app and launched it in the cloud. And now you are seeing what many wish for: an exponential adoption of your app. 

But is your database tier really up to the job? 

What happens if your MySQL server fails?
Can you fail over to a replica<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33338&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33338&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/05/25/webinar-531-building-a-multi-master-multi-region-mysql-solution-in-the-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Webinar 5/31: Building a multi-master, multi-region MySQL solution in the Cloud</title>
		<link>http://continuent-tungsten.blogspot.com/2012/05/webinar-531-building-building-multi.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=webinar-531-building-a-multi-master-multi-region-mysql-solution-in-the-cloud</link>
		<comments>http://continuent-tungsten.blogspot.com/2012/05/webinar-531-building-building-multi.html#comments</comments>
		<pubDate>Thu, 24 May 2012 22:24:00 +0000</pubDate>
		<dc:creator>Petri Virsunen</dc:creator>
				<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[Continuent Tungsten]]></category>
		<category><![CDATA[geo-cluster]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://planetmysql.ru/?guid=a1d25f8062b19674e390ec659be9de40</guid>
		<description><![CDATA[Growth is good, right? Yes, unless you are the one building and managing a MySQL database tier to handle all this growth!  

Your company has built a great new app and launched it in the cloud. And now you are seeing what many wish for: an exponential adoption of your app. 

But is your database tier really up to the job? 

What happens if your MySQL server fails?
Can you fail over to a replica]]></description>
			<content:encoded><![CDATA[Growth is good, right? Yes, unless you are the one building and managing a MySQL database tier to handle all this growth!  

Your company has built a great new app and launched it in the cloud. And now you are seeing what many wish for: an exponential adoption of your app. 

But is your database tier really up to the job? 

What happens if your MySQL server fails?
Can you fail over to a replica<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33338&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33338&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/05/25/webinar-531-building-a-multi-master-multi-region-mysql-solution-in-the-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Challenges of Big Databases with MySQL – IOUG Presentation</title>
		<link>http://www.tokutek.com/2012/05/challenges-of-big-databases-with-mysql-ioug-presentation/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=challenges-of-big-databases-with-mysql-ioug-presentation</link>
		<comments>http://www.tokutek.com/2012/05/challenges-of-big-databases-with-mysql-ioug-presentation/#comments</comments>
		<pubDate>Thu, 24 May 2012 17:22:10 +0000</pubDate>
		<dc:creator>Tokuview Blog</dc:creator>
				<category><![CDATA[announcement]]></category>
		<category><![CDATA[big data]]></category>
		<category><![CDATA[IOUG Collaborate]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[newsql]]></category>
		<category><![CDATA[storage engine]]></category>
		<category><![CDATA[TokuDB]]></category>
		<category><![CDATA[tokutek]]></category>
		<category><![CDATA[TokuView]]></category>

		<guid isPermaLink="false">http://www.tokutek.com/?p=4164</guid>
		<description><![CDATA[&#160;
&#160;
Many database management tasks become difficult as you move from millions of rows and gigabytes of data to billions of rows and terabytes of data. Such tasks include ingesting data while maintaining indexes; changing schemas without downtime; and supporting connections, replication, and backup. For some scaling problems (connections and replication), MySQL® is better than most of the competition. For others, such as indexing, schema changes, and backup, MySQL has typically been harder to use. Fortunately, the tasks MySQL does well are in its core, whereas the tasks that are more difficult can be solved with storage engine plug-ins.
I recently gave a talk at IOUG Collaborate, a copy of which can be found here. This presentation discusses how MySQL&#8217;s storage engines have recently made dramatic progress in large database manageability.
A complete list of MySQL talks from the show can be found here.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tokutek.com/wp-content/uploads/2012/04/collab12.350.png" rel="shadowbox[sbpost-4164];player=img;"><img class="size-full wp-image-3578 alignleft" title="OOW" src="http://www.tokutek.com/wp-content/uploads/2012/04/collab12.350.png" alt="" width="300" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Many database management tasks become difficult as you move from millions of rows and gigabytes of data to billions of rows and terabytes of data. Such tasks include ingesting data while maintaining indexes; changing schemas without downtime; and supporting connections, replication, and backup. For some scaling problems (connections and replication), MySQL<sup>®</sup> is better than most of the competition. For others, such as indexing, schema changes, and backup, MySQL has typically been harder to use. Fortunately, the tasks MySQL does well are in its core, whereas the tasks that are more difficult can be solved with storage engine plug-ins.</p>
<p>I recently gave a talk at IOUG Collaborate, a copy of which can be found <a href="http://www.tokutek.com/resources/technology/" >here</a>. This presentation discusses how MySQL&#8217;s storage engines have recently made dramatic progress in large database manageability.</p>
<p>A complete list of MySQL talks from the show can be found <a href="http://coll12.mapyourshow.com/5_0/sessions/session_results.cfm?type=advanced2&amp;keyword=&amp;ProductLines=MySQL&amp;TrackID=&amp;SpeakerID=&amp;Company=&amp;UserGroup=&amp;Date=&amp;SessionType=" >here</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33334&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33334&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/05/24/challenges-of-big-databases-with-mysql-ioug-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Challenges of Big Databases with MySQL – IOUG Presentation</title>
		<link>http://www.tokutek.com/2012/05/challenges-of-big-databases-with-mysql-ioug-presentation/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=challenges-of-big-databases-with-mysql-ioug-presentation</link>
		<comments>http://www.tokutek.com/2012/05/challenges-of-big-databases-with-mysql-ioug-presentation/#comments</comments>
		<pubDate>Thu, 24 May 2012 17:22:10 +0000</pubDate>
		<dc:creator>Tokuview Blog</dc:creator>
				<category><![CDATA[announcement]]></category>
		<category><![CDATA[big data]]></category>
		<category><![CDATA[IOUG Collaborate]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[newsql]]></category>
		<category><![CDATA[storage engine]]></category>
		<category><![CDATA[TokuDB]]></category>
		<category><![CDATA[tokutek]]></category>
		<category><![CDATA[TokuView]]></category>

		<guid isPermaLink="false">http://www.tokutek.com/?p=4164</guid>
		<description><![CDATA[&#160;
&#160;
Many database management tasks become difficult as you move from millions of rows and gigabytes of data to billions of rows and terabytes of data. Such tasks include ingesting data while maintaining indexes; changing schemas without downtime; and supporting connections, replication, and backup. For some scaling problems (connections and replication), MySQL® is better than most of the competition. For others, such as indexing, schema changes, and backup, MySQL has typically been harder to use. Fortunately, the tasks MySQL does well are in its core, whereas the tasks that are more difficult can be solved with storage engine plug-ins.
I recently gave a talk at IOUG Collaborate, a copy of which can be found here. This presentation discusses how MySQL&#8217;s storage engines have recently made dramatic progress in large database manageability.
A complete list of MySQL talks from the show can be found here.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tokutek.com/wp-content/uploads/2012/04/collab12.350.png" rel="shadowbox[sbpost-4164];player=img;"><img class="size-full wp-image-3578 alignleft" title="OOW" src="http://www.tokutek.com/wp-content/uploads/2012/04/collab12.350.png" alt="" width="300" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Many database management tasks become difficult as you move from millions of rows and gigabytes of data to billions of rows and terabytes of data. Such tasks include ingesting data while maintaining indexes; changing schemas without downtime; and supporting connections, replication, and backup. For some scaling problems (connections and replication), MySQL<sup>®</sup> is better than most of the competition. For others, such as indexing, schema changes, and backup, MySQL has typically been harder to use. Fortunately, the tasks MySQL does well are in its core, whereas the tasks that are more difficult can be solved with storage engine plug-ins.</p>
<p>I recently gave a talk at IOUG Collaborate, a copy of which can be found <a href="http://www.tokutek.com/resources/technology/" >here</a>. This presentation discusses how MySQL&#8217;s storage engines have recently made dramatic progress in large database manageability.</p>
<p>A complete list of MySQL talks from the show can be found <a href="http://coll12.mapyourshow.com/5_0/sessions/session_results.cfm?type=advanced2&amp;keyword=&amp;ProductLines=MySQL&amp;TrackID=&amp;SpeakerID=&amp;Company=&amp;UserGroup=&amp;Date=&amp;SessionType=" >here</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33334&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33334&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/05/24/challenges-of-big-databases-with-mysql-ioug-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best of Guide – Highlights of Our Popular Content</title>
		<link>http://feedproxy.google.com/~r/iheavy/~3/FrdG43vyk8g/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=best-of-guide-highlights-of-our-popular-content</link>
		<comments>http://feedproxy.google.com/~r/iheavy/~3/FrdG43vyk8g/#comments</comments>
		<pubDate>Thu, 24 May 2012 17:00:49 +0000</pubDate>
		<dc:creator>Sean Hull</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[attracting talent]]></category>
		<category><![CDATA[Database Management]]></category>
		<category><![CDATA[hiring]]></category>
		<category><![CDATA[howto guides]]></category>
		<category><![CDATA[hr]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[Startups]]></category>

		<guid isPermaLink="false">http://www.iheavy.com/?p=4399</guid>
		<description><![CDATA[Read the original article at Best of Guide &#8211; Highlights of Our Popular ContentTop 5 Most Popular5 Things Toxic to ScalabilityWe use a broad brush to highlight the biggest no-nos in web application scalability.5 Ways to Boost Scalability for MySQLWe dig into scalability, steering to the richest areas to focus on.8 Best Practices for Deploying MySQL Databases on Amazon EC2MySQL on Amazon EC2, the what, how and when.MySQL and Oracle &#8211; Migration ConsiderationsWe highlight some of the big differences between the two database engines. We&#8217;re also working on revamping this content, so stay tuned for more.MySQL DBA Interview GuideInterviewing a MySQL DBA &#8211; a guide for managers. Also helpful if you&#8217;re gearing up for an interview.Hiring GuidesMySQL DBA Interview Questions (part 1)MySQL DBA Interview Questions (part 2)This two part guide for a hiring manager, focuses on the MySQL Database Operations role.Interviewing an Oracle DBA CandidateA long time favorite, a hiring guide for Oracle DBAs.Hiring a Great DeveloperDevops is the latest craze in bringing the worlds of operations and development together.  We talk about how to identify and attract such a candidate.Hiring an Amazon EC2 ExpertToday the cloud is *almost* synonymous with Amazon Web Services and their Elastic Compute (EC2) cloud offering.  Want to hire the best, here&#8217;s the step-by-step guide.Howtos5 Tips for Web Application Caching for PerformanceCaching caching everywhere.  Learn to do it right.MySQL Replication with HotbackupsHotbackups make building replicas a snap.  Avoid the downtime &#38; speedup the process.Ten Best Practices for MySQL BackupsGet your backups right so you can get some sleep at night!Autoscaling MySQL on Amazon EC2Learn how to automatically spinup new MySQL slaves in Amazon EC2.Industry CommentaryFinding a Mythical MySQL DBAA decade ago startups large and small were running on Oracle, but no longer.  As the shift intensifies, it becomes harder and harder to find the right talent.  Here&#8217;s why.Myth of Five NinesHigh availability ain&#8217;t what it used to be.  Here&#8217;s why nobody is really achieving so-called five nines.Why Generalists are Better at Scaling the WebWe argue that technologists with broad experience are needed to achieve scalability for today&#8217;s high traffic high transaction websites.Startup &#38; Small Business Advice3 Things Every CEO Should Know About the CloudYou&#8217;ve heard all the hype.  Now for some medicine.Consulting 101 &#8211; Finding BusinessConsulting 101 &#8211; Completing EngagementsConsulting 101 &#8211; Growing BusinessOur three part guide takes you through ten steps to building a successful consulting business.  This is as much a guide for freelancers or wanna be consultants, as it is for startups, and those wishing to hire good temporary resources.Book ReviewsScalability Rules for Managers &#38; StartupsLearn about scalability from the guys at AKF.Ronald Bradford&#8217;s Guide to Writing Better SQLHere&#8217;s a great how-to book, short and to the point.  Optimizing those queries!The Lean Startup &#8211; Eric RiesBuilding a startup doesn&#8217;t have to mean big money. Stay efficient and build those margins.What Wouldn&#8217;t Google Do &#8211; JarvisJeff Jarvis champions Google, but we flip the question around.Hidden GemsCloud Computing Use CasesCut through the hype.  Which types of applications really do lend themselves to deploying in the cloud?Why (or Why Not) to Migrate to the CloudAsk some tough questions before you deploy everything in the cloud.3 Biggest MySQL Migration SurprisesMigrating your application from Oracle to MySQL, you may be in for a bumpy road.  Here are a few things to watch out for.Introduction to EC2 Cloud DeploymentsSoup to nuts guide to deploying applications on Amazon Web Services EC2.For more articles like these go to iHeavy, Inc +1-212-533-6828]]></description>
			<content:encoded><![CDATA[<p>Read the original article at <a href="http://www.iheavy.com/2012/05/24/best-guide-highlights-popular-content/">Best of Guide &#8211; Highlights of Our Popular Content</a></p><h2><a href="http://www.iheavy.com/2012/05/24/best-guide-highlights-popular-content/gift/" rel="attachment wp-att-4430"><img class="alignleft size-full wp-image-4430" title="gift" src="http://www.iheavy.com/wp-content/uploads/2012/05/gift.png" alt="" width="250" height="194" /></a>Top 5 Most Popular</h2><div><ul><ul><li><a href="http://www.iheavy.com/2011/08/26/5-things-are-toxic-to-scalability/">5 Things Toxic to Scalability</a></li></ul></ul><p>We use a broad brush to highlight the biggest no-nos in web application scalability.</p><ul><ul><li><a href="http://www.iheavy.com/2011/07/28/5-ways-to-boost-mysql-scalability/">5 Ways to Boost Scalability for MySQL</a></li></ul></ul><p>We dig into scalability, steering to the richest areas to focus on.</p><ul><ul><li><a href="http://www.iheavy.com/2011/02/21/deploying-mysql-on-amazon-ec2-best-practices/">8 Best Practices for Deploying MySQL Databases on Amazon EC2</a></li></ul></ul><p>MySQL on Amazon EC2, the what, how and when.</p><ul><ul><li><a href="http://www.iheavy.com/2008/01/01/migrating-mysql-to-oracle/">MySQL and Oracle &#8211; Migration Considerations</a></li></ul></ul><p>We highlight some of the big differences between the two database engines. We&#8217;re also working on revamping this content, so stay tuned for more.</p><ul><ul><li><a href="http://www.iheavy.com/2012/02/26/top-mysql-dba-interview-questions-part-1/">MySQL DBA Interview Guide</a></li></ul></ul><p>Interviewing a MySQL DBA &#8211; a guide for managers. Also helpful if you&#8217;re gearing up for an interview.</p><h2>Hiring Guides</h2><ul><ul><ul><li><a href="http://www.iheavy.com/2012/02/26/top-mysql-dba-interview-questions-part-1/">MySQL DBA Interview Questions (part 1)</a></li><li><a href="http://www.iheavy.com/2012/02/27/top-mysql-dba-interview-questions-part-2/">MySQL DBA Interview Questions (part 2)</a></li></ul></ul></ul><p>This two part guide for a hiring manager, focuses on the MySQL Database Operations role.</p><ul><ul><ul><li><a href="http://www.iheavy.com/2009/01/01/oracle-dba-interview-questions/">Interviewing an Oracle DBA Candidate</a></li></ul></ul></ul><p>A long time favorite, a hiring guide for Oracle DBAs.</p><ul><ul><ul><li><a href="http://www.iheavy.com/2011/11/25/how-to-hire-a-developer-that-doesnt-suck/">Hiring a Great Developer</a></li></ul></ul></ul><p>Devops is the latest craze in bringing the worlds of operations and development together.  We talk about how to identify and attract such a candidate.</p><ul><ul><li><a href="http://www.iheavy.com/2011/08/05/ec2-interview-aws-interview-cloud-interview-8-questions/">Hiring an Amazon EC2 Expert</a></li></ul></ul><p>Today the cloud is *almost* synonymous with Amazon Web Services and their Elastic Compute (EC2) cloud offering.  Want to hire the best, here&#8217;s the step-by-step guide.</p><h2>Howtos</h2><ul><ul><li><a href="http://www.iheavy.com/2011/11/01/5-tips-cache-websites-boost-speed/">5 Tips for Web Application Caching for Performance</a></li></ul></ul><p>Caching caching everywhere.  Learn to do it right.</p><ul><ul><li><a href="http://www.iheavy.com/2012/04/17/easy-mysql-replication-with-hotbackups-2/">MySQL Replication with Hotbackups</a></li></ul></ul><p>Hotbackups make building replicas a snap.  Avoid the downtime &amp; speedup the process.</p><ul><ul><li><a href="http://www.iheavy.com/2012/05/03/ten-things-remember-mysql-backups/">Ten Best Practices for MySQL Backups</a></li></ul></ul><p>Get your backups right so you can get some sleep at night!</p><ul><ul><li><a href="http://www.iheavy.com/2012/04/09/autoscaling-mysql-on-amazon-ec2/">Autoscaling MySQL on Amazon EC2</a></li></ul></ul><p>Learn how to automatically spinup new MySQL slaves in Amazon EC2.</p><h2>Industry Commentary</h2><ul><ul><li><a href="http://www.iheavy.com/2011/12/19/mythical-mysql-dba/">Finding a Mythical MySQL DBA</a></li></ul></ul><p>A decade ago startups large and small were running on Oracle, but no longer.  As the shift intensifies, it becomes harder and harder to find the right talent.  Here&#8217;s why.</p><ul><ul><li><a href="http://www.iheavy.com/2012/04/01/the-myth-of-five-nines-why-high-availability-is-overrated/">Myth of Five Nines</a></li></ul></ul><p>High availability ain&#8217;t what it used to be.  Here&#8217;s why nobody is really achieving so-called five nines.</p><ul><ul><li><a href="http://www.iheavy.com/2011/10/25/why-generalists-better-scaling-web/">Why Generalists are Better at Scaling the Web</a></li></ul></ul><p>We argue that technologists with broad experience are needed to achieve scalability for today&#8217;s high traffic high transaction websites.</p><h2>Startup &amp; Small Business Advice</h2><ul><ul><ul><li><a href="http://www.iheavy.com/2012/05/08/3-things-ceos-should-know-about-the-cloud-2/">3 Things Every CEO Should Know About the Cloud</a></li></ul></ul></ul><p>You&#8217;ve heard all the hype.  Now for some medicine.</p><ul><ul><ul><li><a href="http://www.iheavy.com/2012/05/10/tech-consulting-essentials-getting-the-business/">Consulting 101 &#8211; Finding Business</a></li><li><a href="http://www.iheavy.com/2012/05/15/consulting-essentials-managing-completing-engagements/">Consulting 101 &#8211; Completing Engagements</a></li><li><a href="http://www.iheavy.com/2012/05/17/consulting-essentials-building-your-business/">Consulting 101 &#8211; Growing Business</a></li></ul></ul></ul><p>Our three part guide takes you through ten steps to building a successful consulting business.  This is as much a guide for freelancers or wanna be consultants, as it is for startups, and those wishing to hire good temporary resources.</p><h2>Book Reviews</h2><ul><ul><ul><li><a href="http://www.iheavy.com/2012/01/10/scalability-rules-managers-startups/">Scalability Rules for Managers &amp; Startups</a></li></ul></ul></ul><p>Learn about scalability from the guys at AKF.</p><ul><ul><ul><li><a href="http://www.iheavy.com/2011/11/03/book-review-effective-mysql-optimizing-sql/">Ronald Bradford&#8217;s Guide to Writing Better SQL</a></li></ul></ul></ul><p>Here&#8217;s a great how-to book, short and to the point.  Optimizing those queries!</p><ul><ul><ul><li><a href="http://www.iheavy.com/2011/10/27/book-review-lean-startup-eric-ries/">The Lean Startup &#8211; Eric Ries</a></li></ul></ul></ul><p>Building a startup doesn&#8217;t have to mean big money. Stay efficient and build those margins.</p><ul><ul><ul><li><a href="http://www.iheavy.com/2012/01/27/what-wouldnt-google-do/">What Wouldn&#8217;t Google Do &#8211; Jarvis</a></li></ul></ul></ul><p>Jeff Jarvis champions Google, but we flip the question around.</p><h2>Hidden Gems</h2><ul><ul><ul><li><a href="http://www.iheavy.com/2011/04/05/cloud-computing-use-cases/">Cloud Computing Use Cases</a></li></ul></ul></ul><p>Cut through the hype.  Which types of applications really do lend themselves to deploying in the cloud?</p><ul><ul><ul><li><a href="http://www.iheavy.com/2011/07/13/migrating-to-the-cloud-why-and-why-not/">Why (or Why Not) to Migrate to the Cloud</a></li></ul></ul></ul><p>Ask some tough questions before you deploy everything in the cloud.</p><ul><ul><ul><li><a href="http://www.iheavy.com/2011/08/29/3-biggest-mysql-migration-surprises/">3 Biggest MySQL Migration Surprises</a></li></ul></ul></ul><p>Migrating your application from Oracle to MySQL, you may be in for a bumpy road.  Here are a few things to watch out for.</p><ul><ul><ul><li><a href="http://www.iheavy.com/2010/12/14/introduction-to-ec2-cloud-deployments/">Introduction to EC2 Cloud Deployments</a></li></ul></ul></ul><p>Soup to nuts guide to deploying applications on Amazon Web Services EC2.</p></div><p>For more articles like these go to <a href="http://www.iheavy.com">iHeavy, Inc +1-212-533-6828</a></p><img src="http://feeds.feedburner.com/~r/iheavy/~4/FrdG43vyk8g" height="1" width="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33336&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33336&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/05/24/best-of-guide-highlights-of-our-popular-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best of Guide – Highlights of Our Popular Content</title>
		<link>http://feedproxy.google.com/~r/iheavy/~3/FrdG43vyk8g/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=best-of-guide-highlights-of-our-popular-content</link>
		<comments>http://feedproxy.google.com/~r/iheavy/~3/FrdG43vyk8g/#comments</comments>
		<pubDate>Thu, 24 May 2012 17:00:49 +0000</pubDate>
		<dc:creator>Sean Hull</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[attracting talent]]></category>
		<category><![CDATA[Database Management]]></category>
		<category><![CDATA[hiring]]></category>
		<category><![CDATA[howto guides]]></category>
		<category><![CDATA[hr]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[Startups]]></category>

		<guid isPermaLink="false">http://www.iheavy.com/?p=4399</guid>
		<description><![CDATA[Read the original article at Best of Guide &#8211; Highlights of Our Popular ContentTop 5 Most Popular5 Things Toxic to ScalabilityWe use a broad brush to highlight the biggest no-nos in web application scalability.5 Ways to Boost Scalability for MySQLWe dig into scalability, steering to the richest areas to focus on.8 Best Practices for Deploying MySQL Databases on Amazon EC2MySQL on Amazon EC2, the what, how and when.MySQL and Oracle &#8211; Migration ConsiderationsWe highlight some of the big differences between the two database engines. We&#8217;re also working on revamping this content, so stay tuned for more.MySQL DBA Interview GuideInterviewing a MySQL DBA &#8211; a guide for managers. Also helpful if you&#8217;re gearing up for an interview.Hiring GuidesMySQL DBA Interview Questions (part 1)MySQL DBA Interview Questions (part 2)This two part guide for a hiring manager, focuses on the MySQL Database Operations role.Interviewing an Oracle DBA CandidateA long time favorite, a hiring guide for Oracle DBAs.Hiring a Great DeveloperDevops is the latest craze in bringing the worlds of operations and development together.  We talk about how to identify and attract such a candidate.Hiring an Amazon EC2 ExpertToday the cloud is *almost* synonymous with Amazon Web Services and their Elastic Compute (EC2) cloud offering.  Want to hire the best, here&#8217;s the step-by-step guide.Howtos5 Tips for Web Application Caching for PerformanceCaching caching everywhere.  Learn to do it right.MySQL Replication with HotbackupsHotbackups make building replicas a snap.  Avoid the downtime &#38; speedup the process.Ten Best Practices for MySQL BackupsGet your backups right so you can get some sleep at night!Autoscaling MySQL on Amazon EC2Learn how to automatically spinup new MySQL slaves in Amazon EC2.Industry CommentaryFinding a Mythical MySQL DBAA decade ago startups large and small were running on Oracle, but no longer.  As the shift intensifies, it becomes harder and harder to find the right talent.  Here&#8217;s why.Myth of Five NinesHigh availability ain&#8217;t what it used to be.  Here&#8217;s why nobody is really achieving so-called five nines.Why Generalists are Better at Scaling the WebWe argue that technologists with broad experience are needed to achieve scalability for today&#8217;s high traffic high transaction websites.Startup &#38; Small Business Advice3 Things Every CEO Should Know About the CloudYou&#8217;ve heard all the hype.  Now for some medicine.Consulting 101 &#8211; Finding BusinessConsulting 101 &#8211; Completing EngagementsConsulting 101 &#8211; Growing BusinessOur three part guide takes you through ten steps to building a successful consulting business.  This is as much a guide for freelancers or wanna be consultants, as it is for startups, and those wishing to hire good temporary resources.Book ReviewsScalability Rules for Managers &#38; StartupsLearn about scalability from the guys at AKF.Ronald Bradford&#8217;s Guide to Writing Better SQLHere&#8217;s a great how-to book, short and to the point.  Optimizing those queries!The Lean Startup &#8211; Eric RiesBuilding a startup doesn&#8217;t have to mean big money. Stay efficient and build those margins.What Wouldn&#8217;t Google Do &#8211; JarvisJeff Jarvis champions Google, but we flip the question around.Hidden GemsCloud Computing Use CasesCut through the hype.  Which types of applications really do lend themselves to deploying in the cloud?Why (or Why Not) to Migrate to the CloudAsk some tough questions before you deploy everything in the cloud.3 Biggest MySQL Migration SurprisesMigrating your application from Oracle to MySQL, you may be in for a bumpy road.  Here are a few things to watch out for.Introduction to EC2 Cloud DeploymentsSoup to nuts guide to deploying applications on Amazon Web Services EC2.For more articles like these go to iHeavy, Inc +1-212-533-6828]]></description>
			<content:encoded><![CDATA[<p>Read the original article at <a href="http://www.iheavy.com/2012/05/24/best-guide-highlights-popular-content/">Best of Guide &#8211; Highlights of Our Popular Content</a></p><h2><a href="http://www.iheavy.com/2012/05/24/best-guide-highlights-popular-content/gift/" rel="attachment wp-att-4430"><img class="alignleft size-full wp-image-4430" title="gift" src="http://www.iheavy.com/wp-content/uploads/2012/05/gift.png" alt="" width="250" height="194" /></a>Top 5 Most Popular</h2><div><ul><ul><li><a href="http://www.iheavy.com/2011/08/26/5-things-are-toxic-to-scalability/">5 Things Toxic to Scalability</a></li></ul></ul><p>We use a broad brush to highlight the biggest no-nos in web application scalability.</p><ul><ul><li><a href="http://www.iheavy.com/2011/07/28/5-ways-to-boost-mysql-scalability/">5 Ways to Boost Scalability for MySQL</a></li></ul></ul><p>We dig into scalability, steering to the richest areas to focus on.</p><ul><ul><li><a href="http://www.iheavy.com/2011/02/21/deploying-mysql-on-amazon-ec2-best-practices/">8 Best Practices for Deploying MySQL Databases on Amazon EC2</a></li></ul></ul><p>MySQL on Amazon EC2, the what, how and when.</p><ul><ul><li><a href="http://www.iheavy.com/2008/01/01/migrating-mysql-to-oracle/">MySQL and Oracle &#8211; Migration Considerations</a></li></ul></ul><p>We highlight some of the big differences between the two database engines. We&#8217;re also working on revamping this content, so stay tuned for more.</p><ul><ul><li><a href="http://www.iheavy.com/2012/02/26/top-mysql-dba-interview-questions-part-1/">MySQL DBA Interview Guide</a></li></ul></ul><p>Interviewing a MySQL DBA &#8211; a guide for managers. Also helpful if you&#8217;re gearing up for an interview.</p><h2>Hiring Guides</h2><ul><ul><ul><li><a href="http://www.iheavy.com/2012/02/26/top-mysql-dba-interview-questions-part-1/">MySQL DBA Interview Questions (part 1)</a></li><li><a href="http://www.iheavy.com/2012/02/27/top-mysql-dba-interview-questions-part-2/">MySQL DBA Interview Questions (part 2)</a></li></ul></ul></ul><p>This two part guide for a hiring manager, focuses on the MySQL Database Operations role.</p><ul><ul><ul><li><a href="http://www.iheavy.com/2009/01/01/oracle-dba-interview-questions/">Interviewing an Oracle DBA Candidate</a></li></ul></ul></ul><p>A long time favorite, a hiring guide for Oracle DBAs.</p><ul><ul><ul><li><a href="http://www.iheavy.com/2011/11/25/how-to-hire-a-developer-that-doesnt-suck/">Hiring a Great Developer</a></li></ul></ul></ul><p>Devops is the latest craze in bringing the worlds of operations and development together.  We talk about how to identify and attract such a candidate.</p><ul><ul><li><a href="http://www.iheavy.com/2011/08/05/ec2-interview-aws-interview-cloud-interview-8-questions/">Hiring an Amazon EC2 Expert</a></li></ul></ul><p>Today the cloud is *almost* synonymous with Amazon Web Services and their Elastic Compute (EC2) cloud offering.  Want to hire the best, here&#8217;s the step-by-step guide.</p><h2>Howtos</h2><ul><ul><li><a href="http://www.iheavy.com/2011/11/01/5-tips-cache-websites-boost-speed/">5 Tips for Web Application Caching for Performance</a></li></ul></ul><p>Caching caching everywhere.  Learn to do it right.</p><ul><ul><li><a href="http://www.iheavy.com/2012/04/17/easy-mysql-replication-with-hotbackups-2/">MySQL Replication with Hotbackups</a></li></ul></ul><p>Hotbackups make building replicas a snap.  Avoid the downtime &amp; speedup the process.</p><ul><ul><li><a href="http://www.iheavy.com/2012/05/03/ten-things-remember-mysql-backups/">Ten Best Practices for MySQL Backups</a></li></ul></ul><p>Get your backups right so you can get some sleep at night!</p><ul><ul><li><a href="http://www.iheavy.com/2012/04/09/autoscaling-mysql-on-amazon-ec2/">Autoscaling MySQL on Amazon EC2</a></li></ul></ul><p>Learn how to automatically spinup new MySQL slaves in Amazon EC2.</p><h2>Industry Commentary</h2><ul><ul><li><a href="http://www.iheavy.com/2011/12/19/mythical-mysql-dba/">Finding a Mythical MySQL DBA</a></li></ul></ul><p>A decade ago startups large and small were running on Oracle, but no longer.  As the shift intensifies, it becomes harder and harder to find the right talent.  Here&#8217;s why.</p><ul><ul><li><a href="http://www.iheavy.com/2012/04/01/the-myth-of-five-nines-why-high-availability-is-overrated/">Myth of Five Nines</a></li></ul></ul><p>High availability ain&#8217;t what it used to be.  Here&#8217;s why nobody is really achieving so-called five nines.</p><ul><ul><li><a href="http://www.iheavy.com/2011/10/25/why-generalists-better-scaling-web/">Why Generalists are Better at Scaling the Web</a></li></ul></ul><p>We argue that technologists with broad experience are needed to achieve scalability for today&#8217;s high traffic high transaction websites.</p><h2>Startup &amp; Small Business Advice</h2><ul><ul><ul><li><a href="http://www.iheavy.com/2012/05/08/3-things-ceos-should-know-about-the-cloud-2/">3 Things Every CEO Should Know About the Cloud</a></li></ul></ul></ul><p>You&#8217;ve heard all the hype.  Now for some medicine.</p><ul><ul><ul><li><a href="http://www.iheavy.com/2012/05/10/tech-consulting-essentials-getting-the-business/">Consulting 101 &#8211; Finding Business</a></li><li><a href="http://www.iheavy.com/2012/05/15/consulting-essentials-managing-completing-engagements/">Consulting 101 &#8211; Completing Engagements</a></li><li><a href="http://www.iheavy.com/2012/05/17/consulting-essentials-building-your-business/">Consulting 101 &#8211; Growing Business</a></li></ul></ul></ul><p>Our three part guide takes you through ten steps to building a successful consulting business.  This is as much a guide for freelancers or wanna be consultants, as it is for startups, and those wishing to hire good temporary resources.</p><h2>Book Reviews</h2><ul><ul><ul><li><a href="http://www.iheavy.com/2012/01/10/scalability-rules-managers-startups/">Scalability Rules for Managers &amp; Startups</a></li></ul></ul></ul><p>Learn about scalability from the guys at AKF.</p><ul><ul><ul><li><a href="http://www.iheavy.com/2011/11/03/book-review-effective-mysql-optimizing-sql/">Ronald Bradford&#8217;s Guide to Writing Better SQL</a></li></ul></ul></ul><p>Here&#8217;s a great how-to book, short and to the point.  Optimizing those queries!</p><ul><ul><ul><li><a href="http://www.iheavy.com/2011/10/27/book-review-lean-startup-eric-ries/">The Lean Startup &#8211; Eric Ries</a></li></ul></ul></ul><p>Building a startup doesn&#8217;t have to mean big money. Stay efficient and build those margins.</p><ul><ul><ul><li><a href="http://www.iheavy.com/2012/01/27/what-wouldnt-google-do/">What Wouldn&#8217;t Google Do &#8211; Jarvis</a></li></ul></ul></ul><p>Jeff Jarvis champions Google, but we flip the question around.</p><h2>Hidden Gems</h2><ul><ul><ul><li><a href="http://www.iheavy.com/2011/04/05/cloud-computing-use-cases/">Cloud Computing Use Cases</a></li></ul></ul></ul><p>Cut through the hype.  Which types of applications really do lend themselves to deploying in the cloud?</p><ul><ul><ul><li><a href="http://www.iheavy.com/2011/07/13/migrating-to-the-cloud-why-and-why-not/">Why (or Why Not) to Migrate to the Cloud</a></li></ul></ul></ul><p>Ask some tough questions before you deploy everything in the cloud.</p><ul><ul><ul><li><a href="http://www.iheavy.com/2011/08/29/3-biggest-mysql-migration-surprises/">3 Biggest MySQL Migration Surprises</a></li></ul></ul></ul><p>Migrating your application from Oracle to MySQL, you may be in for a bumpy road.  Here are a few things to watch out for.</p><ul><ul><ul><li><a href="http://www.iheavy.com/2010/12/14/introduction-to-ec2-cloud-deployments/">Introduction to EC2 Cloud Deployments</a></li></ul></ul></ul><p>Soup to nuts guide to deploying applications on Amazon Web Services EC2.</p></div><p>For more articles like these go to <a href="http://www.iheavy.com">iHeavy, Inc +1-212-533-6828</a></p><img src="http://feeds.feedburner.com/~r/iheavy/~4/FrdG43vyk8g" height="1" width="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33336&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33336&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/05/24/best-of-guide-highlights-of-our-popular-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Webinar – Migrating to Percona XtraDB Cluster</title>
		<link>http://www.mysqlperformanceblog.com/2012/05/24/webinar-migrating-xtradb-cluster/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=webinar-migrating-to-percona-xtradb-cluster</link>
		<comments>http://www.mysqlperformanceblog.com/2012/05/24/webinar-migrating-xtradb-cluster/#comments</comments>
		<pubDate>Thu, 24 May 2012 16:00:39 +0000</pubDate>
		<dc:creator>Jay Janssen</dc:creator>
				<category><![CDATA[Events and Announcements]]></category>
		<category><![CDATA[Insight for DBAs]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[XtraDB Cluster]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=9627</guid>
		<description><![CDATA[Whenever I learn about a new technology, I typically want to know the major administrative touch points more than I want to know exhaustive detail about every configuration option.  Give me the gist, show me enough to started, and give me a link to the manual.
XtraDB cluster (and Galera, the technology on which it is based) have been attracting a lot of interest in the community and we want to start presenting information about both what we know is essential, but also what we suspect will become essential as more and more production experience is logged with these important new technologies.
As such, I put together a talk to cover the baseline required knowledge for getting you into a working knowledge XtraDB Cluster that I&#8217;m presenting as a webinar on June 6th at 10AM PDT.  You can find details and register for it here.  This session will cover:

Essential and Important configuration settings for Galera, but also changes to your existing MySQL settings
Migration strategies for moving from a traditional Master/Slave topology into XtraDB Cluster
Managing Application -&#62; Cluster connectivity in a highly available way
Monitoring the cluster and individual nodes
Performing cluster maintenance
Node deployment architectures and Quorum arbitration

This webinar will run a lot like a standard conference session, ~45 min of presentation with time for Q&#38;A at the end.  Hope to see you there!]]></description>
			<content:encoded><![CDATA[<p>Whenever I learn about a new technology, I typically want to know the major administrative touch points more than I want to know exhaustive detail about every configuration option.  Give me the gist, show me enough to started, and give me a link to the manual.</p>
<p><a href="http://www.percona.com/software/percona-xtradb-cluster/">XtraDB cluster </a>(and <a href="http://codership.com/">Galera</a>, the technology on which it is based) have been attracting a lot of interest in the community and we want to start presenting information about both what we know is essential, but also what we suspect will become essential as more and more production experience is logged with these important new technologies.</p>
<p>As such, I put together a talk to cover the baseline required knowledge for getting you into a working knowledge <a href="http://www.percona.com/software/percona-xtradb-cluster/">XtraDB Cluster</a> that I&#8217;m presenting as a <a href="http://www.percona.com/webinars/2012-06-06-migrating-to-percona-xtradb-cluster/">webinar on June 6th at 10AM PDT</a>.  You can find details and register for it <a href="http://www.percona.com/webinars/2012-06-06-migrating-to-percona-xtradb-cluster/">here</a>.  This session will cover:</p>
<ul>
<li>Essential and Important configuration settings for Galera, but also changes to your existing MySQL settings</li>
<li>Migration strategies for moving from a traditional Master/Slave topology into XtraDB Cluster</li>
<li>Managing Application -&gt; Cluster connectivity in a highly available way</li>
<li>Monitoring the cluster and individual nodes</li>
<li>Performing cluster maintenance</li>
<li>Node deployment architectures and Quorum arbitration</li>
</ul>
<div>This webinar will run a lot like a standard conference session, ~45 min of presentation with time for Q&amp;A at the end.  Hope to see you there!</div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33335&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33335&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/05/24/webinar-migrating-to-percona-xtradb-cluster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Binary log file size matters (sometimes)</title>
		<link>http://www.mysqlperformanceblog.com/2012/05/24/binary-log-file-size-matters/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=binary-log-file-size-matters-sometimes</link>
		<comments>http://www.mysqlperformanceblog.com/2012/05/24/binary-log-file-size-matters/#comments</comments>
		<pubDate>Thu, 24 May 2012 14:20:27 +0000</pubDate>
		<dc:creator>MySQL Performance Blog</dc:creator>
				<category><![CDATA[binary logs]]></category>
		<category><![CDATA[ext3]]></category>
		<category><![CDATA[Insight for DBAs]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=9611</guid>
		<description><![CDATA[I used to think one should never look at max_binlog_size, however last year I had a couple of interesting cases which showed that sometimes it may be very important variable to tune properly. I meant to write about it earlier but never really had a chance to do it. I have it now!
One of our customers was complaining that the database would lock up at random times and then it would go back to normal in just a few seconds. This was MySQL 5.0 running MyISAM/InnoDB mix, not heavily loaded. We used pt-stalk (at that time it was aspersa stalk) trying to figure out what is happening, however all we found was a spike in writes, many queries piled up and looking at the system process list it was quite obvious that page flush daemon was acting out. I/O Pattern was rather awkward &#8211; here is an output from pt-diskstats (again, aspersa diskstats at that time):

 rd_s rd_avkb rd_mb_s rd_mrg rd_cnc   rd_rt    wr_s wr_avkb wr_mb_s wr_mrg wr_cnc   wr_rt busy in_prg
 24.0    13.0     0.2     0%    1.4    59.3  1089.2   195.8   104.1    95%  100.1    91.9 100%      1
 14.0     8.0     0.1     0%    0.1     5.4    10.0   246.4     1.2    97%    0.0     2.0   8%      0
 36.0     9.3     0.2     0%    0.2     4.2     6.0   109.3     0.3    93%    0.0     0.2  15%      0
 12.0     8.7     0.1     0%    0.1     4.2     6.0   101.3     0.3    92%    0.0     0.0   5%      0

You can see that (a) reads are affected &#8211; response time dropped significantly and (b) the reason appears to be enormous amount of writes. For a while I was really puzzled, looking for answers in MySQL status counters, innodb status, memory info and what not. It seemed that the problem was gone before pt-stalk would kick-off and all I could see was symptoms. Indeed the case it was. I was not allowed to run pmp or oprofile on that system due to potential performance impact. However, somehow I have noticed that pt-stalk kick-off time matched that of binary logs modification time:

-rw-r--r-- 1 root root 91 Nov 2 15:15 2011_11_02_15_15_13-trigger
-rw-r--r-- 1 root root 91 Nov 2 16:17 2011_11_02_16_17_20-trigger
-rw-r--r-- 1 root root 91 Nov 2 17:38 2011_11_02_17_38_22-trigger
-rw-r--r-- 1 root root 91 Nov 3 08:36 2011_11_03_08_36_00-trigger
...


-rw-rw---- 1 mysql mysql 1073742171 Nov 2 15:15 /var/lib/mysqllogs/db1-bin-log.003229
-rw-rw---- 1 mysql mysql 1073742976 Nov 2 16:17 /var/lib/mysqllogs/db1-bin-log.003230
-rw-rw---- 1 mysql mysql 1073742688 Nov 2 17:38 /var/lib/mysqllogs/db1-bin-log.003231
-rw-rw---- 1 mysql mysql 1073742643 Nov 2 20:06 /var/lib/mysqllogs/db1-bin-log.003232
-rw-rw---- 1 mysql mysql 1073742974 Nov 3 00:10 /var/lib/mysqllogs/db1-bin-log.003233
-rw-rw---- 1 mysql mysql 1073742566 Nov 3 08:35 /var/lib/mysqllogs/db1-bin-log.003234

What is happening here?
Apparently, every time current binary log gets close to max_binlog_size in size, new binary log is created and, if expire_logs_days is not zeroish, log files older than expire_logs_days are removed. &#038;LOCK_log mutex is held for the duration of the binary log removal and if your file system is slow at deleting files (both customers systems ran on ext3, which can be very slow deleting large files), then write operations in MySQL will suffer since that very same mutex is used inside MYSQL_LOG::write() call. Even though it only lasts 1-2s, it still gives users unstable response time &#8211; here&#8217;s how that looks on one of the customer system &#8211; this one was doing ~10k qps at a time:

# mysqladmin ext -i1 &#124; grep Threads_running
...
&#124; Threads_running                   &#124; 2              &#124;
&#124; Threads_running                   &#124; 2              &#124;
&#124; Threads_running                   &#124; 2              &#124;
&#124; Threads_running                   &#124; 2              &#124;
&#124; Threads_running                   &#124; 3              &#124;
&#124; Threads_running                   &#124; 3              &#124;
&#124; Threads_running                   &#124; 2              &#124;
&#124; Threads_running                   &#124; 2              &#124;
&#124; Threads_running                   &#124; 2              &#124;
&#124; Threads_running                   &#124; 3              &#124;
&#124; Threads_running                   &#124; 5              &#124;
&#124; Threads_running                   &#124; 4              &#124;
&#124; Threads_running                   &#124; 3              &#124;
&#124; Threads_running                   &#124; 2              &#124;
&#124; Threads_running                   &#124; 3              &#124;
&#124; Threads_running                   &#124; 108            &#124;
&#124; Threads_running                   &#124; 174            &#124;
&#124; Threads_running                   &#124; 5              &#124;
&#124; Threads_running                   &#124; 2              &#124;
&#124; Threads_running                   &#124; 2              &#124;
&#124; Threads_running                   &#124; 3              &#124;
&#124; Threads_running                   &#124; 2              &#124;

A small blip, yet over 100 users are backlogged for a couple of seconds &#8211; not great user experience, considering this happens every 10-15 minutes.
Solution?
Here&#8217;s what we did: we have reduced the size of binary log file from default 1GB (some systems have it set to 100MB in their default my.cnf) down to 50MB and we never saw this problem ever again. Now the files were removed much more often, they were smaller and didn&#8217;t take that long to remove.
Note that on ext4 and xfs you should not have this problem as they would remove such files much faster.]]></description>
			<content:encoded><![CDATA[<p>I used to think one should never look at max_binlog_size, however last year I had a couple of interesting cases which showed that sometimes it may be very important variable to tune properly. I meant to write about it earlier but never really had a chance to do it. I have it now!<span></span></p>
<p>One of our customers was complaining that the database would lock up at random times and then it would go back to normal in just a few seconds. This was MySQL 5.0 running MyISAM/InnoDB mix, not heavily loaded. We used <a href="http://www.percona.com/doc/percona-toolkit/2.1/pt-stalk.html" title="Percona Toolkit: pt-stalk">pt-stalk</a> (at that time it was aspersa stalk) trying to figure out what is happening, however all we found was a spike in writes, many queries piled up and looking at the system process list it was quite obvious that page flush daemon was acting out. I/O Pattern was rather awkward &#8211; here is an output from <a href="http://www.percona.com/doc/percona-toolkit/2.1/pt-diskstats.html" title="Percona Toolkit: pt-diskstats">pt-diskstats</a> (again, aspersa diskstats at that time):</p>
<pre>
 rd_s rd_avkb rd_mb_s rd_mrg rd_cnc   rd_rt    wr_s wr_avkb wr_mb_s wr_mrg wr_cnc   wr_rt busy in_prg
 24.0    13.0     0.2     0%    1.4    59.3  1089.2   195.8   104.1    95%  100.1    91.9 100%      1
 14.0     8.0     0.1     0%    0.1     5.4    10.0   246.4     1.2    97%    0.0     2.0   8%      0
 36.0     9.3     0.2     0%    0.2     4.2     6.0   109.3     0.3    93%    0.0     0.2  15%      0
 12.0     8.7     0.1     0%    0.1     4.2     6.0   101.3     0.3    92%    0.0     0.0   5%      0
</pre>
<p>You can see that (a) reads are affected &#8211; response time dropped significantly and (b) the reason appears to be enormous amount of writes. For a while I was really puzzled, looking for answers in MySQL status counters, innodb status, memory info and what not. It seemed that the problem was gone before pt-stalk would kick-off and all I could see was symptoms. Indeed the case it was. I was not allowed to run <a href="http://poormansprofiler.org/" title="Poor man's profiler">pmp</a> or <a href="http://oprofile.sourceforge.net/" title="OProfile">oprofile</a> on that system due to potential performance impact. However, somehow I have noticed that pt-stalk kick-off time matched that of binary logs modification time:</p>
<pre>
-rw-r--r-- 1 root root 91 Nov 2 15:15 2011_11_02_15_15_13-trigger
-rw-r--r-- 1 root root 91 Nov 2 16:17 2011_11_02_16_17_20-trigger
-rw-r--r-- 1 root root 91 Nov 2 17:38 2011_11_02_17_38_22-trigger
-rw-r--r-- 1 root root 91 Nov 3 08:36 2011_11_03_08_36_00-trigger
...
</pre>
<pre>
-rw-rw---- 1 mysql mysql 1073742171 Nov 2 15:15 /var/lib/mysqllogs/db1-bin-log.003229
-rw-rw---- 1 mysql mysql 1073742976 Nov 2 16:17 /var/lib/mysqllogs/db1-bin-log.003230
-rw-rw---- 1 mysql mysql 1073742688 Nov 2 17:38 /var/lib/mysqllogs/db1-bin-log.003231
-rw-rw---- 1 mysql mysql 1073742643 Nov 2 20:06 /var/lib/mysqllogs/db1-bin-log.003232
-rw-rw---- 1 mysql mysql 1073742974 Nov 3 00:10 /var/lib/mysqllogs/db1-bin-log.003233
-rw-rw---- 1 mysql mysql 1073742566 Nov 3 08:35 /var/lib/mysqllogs/db1-bin-log.003234
</pre>
<p>What is happening here?</p>
<p>Apparently, every time current binary log gets close to max_binlog_size in size, new binary log is created and, if expire_logs_days is not zeroish, log files older than expire_logs_days are removed. &#038;LOCK_log mutex is held for the duration of the binary log removal and if your file system is slow at deleting files (both customers systems ran on ext3, which can be <a href="http://www.mysqlperformanceblog.com/2009/06/16/slow-drop-table/" title="Slow DROP TABLE by Maciej">very slow deleting large files</a>), then write operations in MySQL will suffer since that very same mutex is used inside MYSQL_LOG::write() call. Even though it only lasts 1-2s, it still gives users unstable response time &#8211; here&#8217;s how that looks on one of the customer system &#8211; this one was doing ~10k qps at a time:</p>
<pre>
# mysqladmin ext -i1 | grep Threads_running
...
| Threads_running                   | 2              |
| Threads_running                   | 2              |
| Threads_running                   | 2              |
| Threads_running                   | 2              |
| Threads_running                   | 3              |
| Threads_running                   | 3              |
| Threads_running                   | 2              |
| Threads_running                   | 2              |
| Threads_running                   | 2              |
| Threads_running                   | 3              |
| Threads_running                   | 5              |
| Threads_running                   | 4              |
| Threads_running                   | 3              |
| Threads_running                   | 2              |
| Threads_running                   | 3              |
| Threads_running                   | 108            |
| Threads_running                   | 174            |
| Threads_running                   | 5              |
| Threads_running                   | 2              |
| Threads_running                   | 2              |
| Threads_running                   | 3              |
| Threads_running                   | 2              |
</pre>
<p>A small blip, yet over 100 users are backlogged for a couple of seconds &#8211; not great user experience, considering this happens every 10-15 minutes.</p>
<p>Solution?</p>
<p>Here&#8217;s what we did: we have reduced the size of binary log file from default 1GB (some systems have it set to 100MB in their default my.cnf) down to 50MB and we never saw this problem ever again. Now the files were removed much more often, they were smaller and didn&#8217;t take that long to remove.</p>
<p>Note that on ext4 and xfs you should not have this problem as they would remove such files much faster.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33332&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33332&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/05/24/binary-log-file-size-matters-sometimes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Striped Views</title>
		<link>http://blog.mclaughlinsoftware.com/2012/05/23/mysql-striped-views/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-striped-views</link>
		<comments>http://blog.mclaughlinsoftware.com/2012/05/23/mysql-striped-views/#comments</comments>
		<pubDate>Thu, 24 May 2012 05:41:40 +0000</pubDate>
		<dc:creator>Michael McLaughlin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[PSM]]></category>
		<category><![CDATA[Stored Procedures]]></category>

		<guid isPermaLink="false">http://blog.mclaughlinsoftware.com/?p=5938</guid>
		<description><![CDATA[A question came up today about how to stripe a MySQL view, and this post shows you how. Along with the question, there was a complaint about why you can&#8217;t use session variables in a view definition. It&#8217;s important to note two things: there&#8217;s a workaround and there&#8217;s an outstanding request to add lift the feature limitation in Bug 18433.
 A striped view lets authorized users see only part of a table, and is how Oracle Database 11g sets up Virtual Private Databases. Oracle provides both schema (or database) level access and fine-grained control access. Fine grained control involves setting a special session variable during a user&#8217;s login. This is typically done by checking the rights in an Access Control List (ACL) and using an Oracle built-in package.
You can do more or less the same thing in MySQL by using stored functions. One function would set the session variable and the other would fetch the value for comparison in a view.
Most developers who try this initially meet failure because they try to embed the session variable inside the view, like this trivial example with Hobbits (can&#8217;t resist the example with the first installment from Peter Jackson out later this year):

1
2
CREATE VIEW hobbit_v AS
SELECT * FROM hobbit WHERE hobbit_name = @sv_login_name;

The syntax is disallowed, as explained in the MySQL Reference 13.1.20 CREATE VIEW Syntax documentation. The attempt raises the following error message:

ERROR 1351 &#040;HY000&#041;: VIEW's SELECT contains a variable or parameter

The fix is quite simple, you write a function that sets the ACL value for the session and another that queries the ACL session value. For the example, I&#8217;ve written the SET_LOGIN_NAME and a GET_LOGIN_NAME functions. (If you&#8217;re new to stored programs, you can find a 58 page chapter on writing them in my Oracle Database 11g &#038; MySQL 5.6 Developer Handbook (Oracle Press) or you can use Guy Harrison&#8217;s MySQL Stored Procedure Programming.)
You would call the SET_LOGIN_NAME when you connect to the MySQL database as the first thing to implement this type of architecture. You would define the function like the following. (Please note that the example includes all setup statements from the command line and should enable you cutting and pasting it.  ):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
-- Change the delimiter to something other than a semicolon.
DELIMITER $$
&#160;
-- Conditionally drop the function.
DROP FUNCTION IF EXISTS set_login_name$$
&#160;
-- Create the function.
CREATE FUNCTION set_login_name&#040;pv_login_name VARCHAR&#040;20&#041;&#041; RETURNS INT UNSIGNED
BEGIN
&#160;
  /* Declare a local variable to verify completion of the task. */
  DECLARE  lv_success_flag  INT UNSIGNED  DEFAULT FALSE;
&#160;
  /* Check whether the input value is something other than a null value. */
  IF pv_login_name IS NOT NULL THEN
&#160;
    /* Set the session variable and enable the success flag. */
    SET @sv_login_name := pv_login_name;
    SET lv_success_flag := TRUE;
&#160;
  END IF;
&#160;
  /* Return the success flag. */
  RETURN lv_success_flag;
END;
$$
&#160;
-- Change the delimiter back to a semicolon.
DELIMITER ;

You can use a query to set and confirm action like this:

SELECT IF&#040;set_login_name&#040;'Frodo'&#041;=1,'Login Name Set','Login Name Not Set'&#041; AS &#34;Login Name Status&#34;;

A more practical example in an API would be this, which returns zero when unset and one when set:

SELECT set_login_name&#040;'Frodo'&#041; AS &#34;Login Name Status&#34;;

The getter function for this example, simply reads the current value of the MySQL session variable. Like the prior example, it&#8217;s ready to run too.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-- Change the delimiter to something other than a semicolon.
DELIMITER $$
&#160;
-- Conditionally drop the function.
DROP FUNCTION IF EXISTS get_login_name$$
&#160;
-- Create the function.
CREATE FUNCTION get_login_name&#040;&#041; RETURNS VARCHAR&#040;20&#041;
BEGIN
  /* Return the success flag. */
  RETURN @sv_login_name;
END;
$$
&#160;
-- Change the delimiter back to a semicolon.
DELIMITER ;

Before you test it, lets create a HOBBIT table, seed it with data, and create a HOBBIT_V view. They&#8217;re bundled together in the following microscript:

-- Conditionally drop the table.
DROP TABLE IF EXISTS hobbit;
&#160;
-- Create the table.
CREATE TABLE hobbit
&#040; hobbit_id    INT UNSIGNED
, hobbit_name  VARCHAR&#040;20&#041;&#041;;
&#160;
-- Seed two rows.
INSERT INTO hobbit VALUES &#040; 1,'Bilbo'&#041;,&#040; 1,'Frodo'&#041;;
&#160;
-- Conditionally drop the view.
DROP VIEW IF EXISTS hobbit_v;
&#160;
-- Create the function-enabled view.
CREATE VIEW hobbit_v AS
SELECT * FROM hobbit WHERE hobbit_name = get_login_name&#040;&#041;;

A query to the table after setting the session variable will only return one row, the row with Frodo in the HOBBIT_NAME column. It also guarantees an unfiltered UPDATE statement against the view only updates the single row returned, like this:

UPDATE hobbit_v SET hobbit_id = 2;

In a real solution, there are more steps. For example, you&#8217;d want your tables in one database, views in another, and functions and procedures in a library database. However, I hope this helps seed some ideas for those interested in creating fine-grained virtual private databases in MySQL with user-authenticated application controls.]]></description>
			<content:encoded><![CDATA[<p>A question came up today about how to stripe a MySQL view, and this post shows you how. Along with the question, there was a complaint about why you <a href="http://dev.mysql.com/doc/refman/5.5/en/create-view.html">can&#8217;t use session variables in a view definition</a>. It&#8217;s important to note two things: there&#8217;s a workaround and there&#8217;s an outstanding request to add lift the feature limitation in <a href="http://bugs.mysql.com/bug.php?id=18433">Bug 18433</a>.</p>
<p><img src="http://www.oracle.com/ocom/groups/public/@otn/documents/digitalasset/104361.gif%20" /> A striped view lets authorized users see only part of a table, and is how Oracle Database 11<em>g</em> sets up Virtual Private Databases. Oracle provides both schema (or database) level access and fine-grained control access. Fine grained control involves setting a special session variable during a user&#8217;s login. This is typically done by checking the rights in an <a href="http://en.wikipedia.org/wiki/Access_control_list">Access Control List (ACL)</a> and using an Oracle built-in package.</p>
<p>You can do more or less the same thing in MySQL by using stored functions. One function would set the session variable and the other would fetch the value for comparison in a view.</p>
<p>Most developers who try this initially meet failure because they try to embed the session variable inside the view, like this trivial example with <em>Hobbits</em> (can&#8217;t resist the example with the first installment from Peter Jackson out later this year):</p>

<div><table><tr><td><pre>1
2
</pre></td><td><pre><span>CREATE</span> <span>VIEW</span> hobbit_v <span>AS</span>
<span>SELECT</span> <span>*</span> <span>FROM</span> hobbit <span>WHERE</span> hobbit_name <span>=</span> @sv_login_name;</pre></td></tr></table></div>

<p>The syntax is disallowed, as explained in the <a href="http://dev.mysql.com/doc/refman/5.5/en/create-view.html">MySQL Reference 13.1.20 <span>CREATE VIEW</span> Syntax</a> documentation. The attempt raises the following error message:</p>

<div><div><pre>ERROR <span>1351</span> <span>&#40;</span>HY000<span>&#41;</span>: <span>VIEW</span><span>'s SELECT contains a variable or parameter</span></pre></div></div>

<p>The fix is quite simple, you write a function that sets the ACL value for the session and another that queries the ACL session value. For the example, I&#8217;ve written the <span>SET_LOGIN_NAME</span> and a <span>GET_LOGIN_NAME</span> functions. (If you&#8217;re new to stored programs, you can find a 58 page chapter on writing them in my <a href="http://www.amazon.com/gp/product/0071768858/ref=as_li_tf_tl?ie=UTF8&amp;tag=macloc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0071768858">Oracle Database 11<em>g</em> &#038; MySQL 5.6 Developer Handbook (Oracle Press)</a> or you can use Guy Harrison&#8217;s <a href="http://www.amazon.com/gp/product/0596100892/ref=as_li_tf_tl?ie=UTF8&amp;tag=macloc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596100892">MySQL Stored Procedure Programming</a>.)</p>
<p>You would call the <span>SET_LOGIN_NAME</span> when you connect to the MySQL database as the first thing to implement this type of architecture. You would define the function like the following. (Please note that the example includes all setup statements from the command line and should enable you cutting and pasting it. <img src="http://blog.mclaughlinsoftware.com/wp-includes/images/smilies/icon_wink.gif" alt=";-)" class="wp-smiley" /> ):</p>

<div><table><tr><td><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td><pre><span>-- Change the delimiter to something other than a semicolon.</span>
DELIMITER $$
&nbsp;
<span>-- Conditionally drop the function.</span>
<span>DROP</span> <span>FUNCTION</span> <span>IF</span> <span>EXISTS</span> set_login_name$$
&nbsp;
<span>-- Create the function.</span>
<span>CREATE</span> <span>FUNCTION</span> set_login_name<span>&#40;</span>pv_login_name <span>VARCHAR</span><span>&#40;</span><span>20</span><span>&#41;</span><span>&#41;</span> <span>RETURNS</span> <span>INT</span> <span>UNSIGNED</span>
<span>BEGIN</span>
&nbsp;
  <span>/* Declare a local variable to verify completion of the task. */</span>
  <span>DECLARE</span>  lv_success_flag  <span>INT</span> <span>UNSIGNED</span>  <span>DEFAULT</span> <span>FALSE</span>;
&nbsp;
  <span>/* Check whether the input value is something other than a null value. */</span>
  <span>IF</span> pv_login_name <span>IS</span> <span>NOT</span> <span>NULL</span> <span>THEN</span>
&nbsp;
    <span>/* Set the session variable and enable the success flag. */</span>
    <span>SET</span> @sv_login_name :<span>=</span> pv_login_name;
    <span>SET</span> lv_success_flag :<span>=</span> <span>TRUE</span>;
&nbsp;
  <span>END</span> <span>IF</span>;
&nbsp;
  <span>/* Return the success flag. */</span>
  <span>RETURN</span> lv_success_flag;
<span>END</span>;
$$
&nbsp;
<span>-- Change the delimiter back to a semicolon.</span>
DELIMITER ;</pre></td></tr></table></div>

<p>You can use a query to set and confirm action like this:</p>

<div><div><pre><span>SELECT</span> <span>IF</span><span>&#40;</span>set_login_name<span>&#40;</span><span>'Frodo'</span><span>&#41;</span><span>=</span><span>1</span><span>,</span><span>'Login Name Set'</span><span>,</span><span>'Login Name Not Set'</span><span>&#41;</span> <span>AS</span> <span>&quot;Login Name Status&quot;</span>;</pre></div></div>

<p>A more practical example in an API would be this, which returns zero when unset and one when set:</p>

<div><div><pre><span>SELECT</span> set_login_name<span>&#40;</span><span>'Frodo'</span><span>&#41;</span> <span>AS</span> <span>&quot;Login Name Status&quot;</span>;</pre></div></div>

<p>The <em>getter</em> function for this example, simply reads the current value of the MySQL session variable. Like the prior example, it&#8217;s ready to run too.</p>

<div><table><tr><td><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td><pre><span>-- Change the delimiter to something other than a semicolon.</span>
DELIMITER $$
&nbsp;
<span>-- Conditionally drop the function.</span>
<span>DROP</span> <span>FUNCTION</span> <span>IF</span> <span>EXISTS</span> get_login_name$$
&nbsp;
<span>-- Create the function.</span>
<span>CREATE</span> <span>FUNCTION</span> get_login_name<span>&#40;</span><span>&#41;</span> <span>RETURNS</span> <span>VARCHAR</span><span>&#40;</span><span>20</span><span>&#41;</span>
<span>BEGIN</span>
  <span>/* Return the success flag. */</span>
  <span>RETURN</span> @sv_login_name;
<span>END</span>;
$$
&nbsp;
<span>-- Change the delimiter back to a semicolon.</span>
DELIMITER ;</pre></td></tr></table></div>

<p>Before you test it, lets create a <span>HOBBIT</span> table, seed it with data, and create a <span>HOBBIT_V</span> view. They&#8217;re bundled together in the following microscript:</p>

<div><div><pre><span>-- Conditionally drop the table.</span>
<span>DROP</span> <span>TABLE</span> <span>IF</span> <span>EXISTS</span> hobbit;
&nbsp;
<span>-- Create the table.</span>
<span>CREATE</span> <span>TABLE</span> hobbit
<span>&#40;</span> hobbit_id    <span>INT</span> <span>UNSIGNED</span>
<span>,</span> hobbit_name  <span>VARCHAR</span><span>&#40;</span><span>20</span><span>&#41;</span><span>&#41;</span>;
&nbsp;
<span>-- Seed two rows.</span>
<span>INSERT</span> <span>INTO</span> hobbit <span>VALUES</span> <span>&#40;</span> <span>1</span><span>,</span><span>'Bilbo'</span><span>&#41;</span><span>,</span><span>&#40;</span> <span>1</span><span>,</span><span>'Frodo'</span><span>&#41;</span>;
&nbsp;
<span>-- Conditionally drop the view.</span>
<span>DROP</span> <span>VIEW</span> <span>IF</span> <span>EXISTS</span> hobbit_v;
&nbsp;
<span>-- Create the function-enabled view.</span>
<span>CREATE</span> <span>VIEW</span> hobbit_v <span>AS</span>
<span>SELECT</span> <span>*</span> <span>FROM</span> hobbit <span>WHERE</span> hobbit_name <span>=</span> get_login_name<span>&#40;</span><span>&#41;</span>;</pre></div></div>

<p>A query to the table after setting the session variable will only return one row, the row with <em>Frodo</em> in the <span>HOBBIT_NAME</span> column. It also guarantees an unfiltered <span>UPDATE</span> statement against the view only updates the single row returned, like this:</p>

<div><div><pre><span>UPDATE</span> hobbit_v <span>SET</span> hobbit_id <span>=</span> <span>2</span>;</pre></div></div>

<p>In a real solution, there are more steps. For example, you&#8217;d want your tables in one database, views in another, and functions and procedures in a library database. However, I hope this helps seed some ideas for those interested in creating fine-grained virtual private databases in MySQL with user-authenticated application controls.   </p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33330&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33330&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/05/24/mysql-striped-views/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Overlooked MySQL 5.6 New Features – WL#5217</title>
		<link>http://mysqlblog.fivefarmers.com/2012/05/23/overlooked-mysql-5-6-new-features-wl5217/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=overlooked-mysql-5-6-new-features-wl5217</link>
		<comments>http://mysqlblog.fivefarmers.com/2012/05/23/overlooked-mysql-5-6-new-features-wl5217/#comments</comments>
		<pubDate>Wed, 23 May 2012 23:35:36 +0000</pubDate>
		<dc:creator>Todd Farmer</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[MySQL 5.6]]></category>
		<category><![CDATA[partitioning]]></category>

		<guid isPermaLink="false">http://mysqlblog.fivefarmers.com/?p=167</guid>
		<description><![CDATA[There&#8217;s a lot of great new features in MySQL 5.6 DMRs &#8211; almost too many to keep track of.  And while a lot of (justified) attention is given to the headline-grabbing features of 5.6 (memcached APIs! global transaction ids! improved PERFORMANCE_SCHEMA!), I&#8217;m often curious about the new features that don&#8217;t make as big a splash.  I thought I would look at one such new feature &#8211; WorkLog #5217.  I&#8217;m not telling you what this WorkLog is yet; test your knowledge of 5.6 features by seeing if you can figure it out from the following scenario.  Imagine the following table data:
mysql&#62; SELECT * FROM p;
+------+------+
&#124; a    &#124; b    &#124;
+------+------+
&#124;    1 &#124;    1 &#124;
&#124;   11 &#124;    1 &#124;
&#124;   21 &#124;    1 &#124;
+------+------+
3 rows in set (0.00 sec)
OK, try to write an UPDATE statement that increments b for the row where a = 21.  Easy, right?
UPDATE p SET b = b+1 WHERE a = 21;
OK, now do it without a WHERE clause.  Maybe that made you think for a minute, but perhaps you came up with something like this:
UPDATE p SET b = b+1 ORDER BY a = 11 DESC LIMIT 1;
Nice!  Now do it without ORDER BY or LIMIT.  Can you do it?
There&#8217;s a hint in the table structure:
mysql&#62; SHOW CREATE TABLE p\G
*************************** 1. row ***************************
Table: p
Create Table: CREATE TABLE `p` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION p1 VALUES LESS THAN (20) ENGINE = InnoDB,
PARTITION p2 VALUES LESS THAN (30) ENGINE = InnoDB) */
1 row in set (0.00 sec)
You&#8217;ve probably figured out that 5.6 adds the ability to explicitly restrict statements to specific partitions, even if you haven&#8217;t found or reviewed the excellent documentation in the manual.  In 5.6, the following works:
mysql&#62; UPDATE p PARTITION(p1) SET b = b+1;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql&#62; SELECT * FROM p;
+------+------+
&#124; a    &#124; b    &#124;
+------+------+
&#124;    1 &#124;    1 &#124;
&#124;   11 &#124;    2 &#124;
&#124;   21 &#124;    1 &#124;
+------+------+
3 rows in set (0.00 sec)
The documentation on this is very good, and provides some useful examples of how this might prove useful, including showing how this works not only with UPDATE statements, but INSERT, SELECT, DELETE, REPLACE and LOAD DATA/XML statements.  There&#8217;s also the WorkLog and associated bugs.mysql.com feature requests.  The documentation says the following about UPDATE statements:
UPDATE statements using explicit partition selection behave in the same way; only rows in the partitions referenced by the PARTITION option are considered when determining the rows to be updated, as can be seen by executing the following statements.
It then provides an example that is similar to the solution for the problem posed above.  I still had one question, though &#8211; what would happen if I did an UPDATE on a partition key column that moves a row from one partition to another?  I get an error:
mysql&#62; UPDATE p PARTITION(p1) SET a = 22 WHERE a = 11;
ERROR 1745 (HY000): Found a row not matching the given partition set
But if I include both the source partition and the target partition, all&#8217;s well:
mysql&#62; UPDATE p PARTITION(p1,p2) SET a = 22 WHERE a = 11;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0
How do I know the data was actually moved from p1 to p2, and that mysqld isn&#8217;t just pulling my leg?  Easy:
mysql&#62; SELECT * FROM p PARTITION(p2);
+------+------+
&#124; a    &#124; b    &#124;
+------+------+
&#124;   21 &#124;    1 &#124;
&#124;   22 &#124;    1 &#124;
+------+------+
Awesome.  You might want to download the 5.6.5 Development Milestone Release yourself and try it out (you&#8217;ll need to click on the &#8220;Development Releases&#8221; tab to access it, something which took me longer to figure out than I care to admit).]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a lot of great new features in MySQL 5.6 DMRs &#8211; almost too many to keep track of.  And while a lot of (justified) attention is given to the headline-grabbing features of 5.6 (memcached APIs! global transaction ids! improved PERFORMANCE_SCHEMA!), I&#8217;m often curious about the new features that don&#8217;t make as big a splash.  I thought I would look at one such new feature &#8211; WorkLog #5217.  I&#8217;m not telling you what this WorkLog is yet; test your knowledge of 5.6 features by seeing if you can figure it out from the following scenario.  Imagine the following table data:</p>
<pre>mysql&gt; SELECT * FROM p;
+------+------+
| a    | b    |
+------+------+
|    1 |    1 |
|   11 |    1 |
|   21 |    1 |
+------+------+
3 rows in set (0.00 sec)</pre>
<p>OK, try to write an UPDATE statement that increments b for the row where a = 21.  Easy, right?</p>
<pre>UPDATE p SET b = b+1 WHERE a = 21;</pre>
<p>OK, now do it without a WHERE clause.  Maybe that made you think for a minute, but perhaps you came up with something like this:</p>
<pre>UPDATE p SET b = b+1 ORDER BY a = 11 DESC LIMIT 1;</pre>
<p>Nice!  Now do it without ORDER BY or LIMIT.  Can you do it?</p>
<p>There&#8217;s a hint in the table structure:</p>
<pre>mysql&gt; SHOW CREATE TABLE p\G
*************************** 1. row ***************************
Table: p
Create Table: CREATE TABLE `p` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION p1 VALUES LESS THAN (20) ENGINE = InnoDB,
PARTITION p2 VALUES LESS THAN (30) ENGINE = InnoDB) */
1 row in set (0.00 sec)</pre>
<p>You&#8217;ve probably figured out that 5.6 adds the ability to explicitly restrict statements to specific partitions, even if you haven&#8217;t found or reviewed the <a href="http://dev.mysql.com/doc/refman/5.6/en/partitioning-selection.html" >excellent documentation in the manual</a>.  In 5.6, the following works:</p>
<pre>mysql&gt; UPDATE p PARTITION(p1) SET b = b+1;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql&gt; SELECT * FROM p;
+------+------+
| a    | b    |
+------+------+
|    1 |    1 |
|   11 |    2 |
|   21 |    1 |
+------+------+
3 rows in set (0.00 sec)</pre>
<p>The <a href="http://dev.mysql.com/doc/refman/5.6/en/partitioning-selection.html" >documentation</a> on this is very good, and provides some useful examples of how this might prove useful, including showing how this works not only with UPDATE statements, but INSERT, SELECT, DELETE, REPLACE and LOAD DATA/XML statements.  There&#8217;s also the <a href="http://forge.mysql.com/worklog/task.php?id=5217" >WorkLog</a> and <a href="http://bugs.mysql.com/bug.php?id=20279" >associated bugs.mysql.com feature requests</a>.  The documentation says the following about UPDATE statements:</p>
<blockquote><p><a title="13.2.11. UPDATE Syntax" href="http://dev.mysql.com/doc/refman/5.6/en/update.html"><code>UPDATE</code></a> statements using explicit partition selection behave in the same way; only rows in the partitions referenced by the <code>PARTITION</code> option are considered when determining the rows to be updated, as can be seen by executing the following statements.</p></blockquote>
<p>It then provides an example that is similar to the solution for the problem posed above.  I still had one question, though &#8211; what would happen if I did an UPDATE on a partition key column that moves a row from one partition to another?  I get an error:</p>
<pre>mysql&gt; UPDATE p PARTITION(p1) SET a = 22 WHERE a = 11;
ERROR 1745 (HY000): Found a row not matching the given partition set</pre>
<p>But if I include both the source partition and the target partition, all&#8217;s well:</p>
<pre>mysql&gt; UPDATE p PARTITION(p1,p2) SET a = 22 WHERE a = 11;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0</pre>
<p>How do I know the data was actually moved from p1 to p2, and that mysqld isn&#8217;t just pulling my leg?  Easy:</p>
<pre>mysql&gt; SELECT * FROM p PARTITION(p2);
+------+------+
| a    | b    |
+------+------+
|   21 |    1 |
|   22 |    1 |
+------+------+</pre>
<p>Awesome.  You might want to <a href="http://dev.mysql.com/downloads/mysql/">download the 5.6.5 Development Milestone Release</a> yourself and try it out (you&#8217;ll need to click on the &#8220;Development Releases&#8221; tab to access it, something which took me longer to figure out than I care to admit).</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33329&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33329&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/05/24/overlooked-mysql-5-6-new-features-wl5217/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

