<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>beer planet &#187; applied</title> <atom:link href="http://beerpla.net/tag/applied/feed/" rel="self" type="application/rss+xml" /><link>http://beerpla.net</link> <description>where things have nothing to do with beer - tutorials, tips, how-tos, thoughts, hacks, and other techy nonsense</description> <lastBuildDate>Fri, 06 Jan 2012 08:50:59 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel='hub' href='http://beerpla.net/?pushpress=hub'/> <item><title>MySQL Conference Liveblogging: Applied Partitioning And Scaling your (OLTP) Database System (Wednesday 11:55AM)</title><link>http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/</link> <comments>http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/#comments</comments> <pubDate>Wed, 16 Apr 2008 19:05:42 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[applied]]></category> <category><![CDATA[conference]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[oltp]]></category> <category><![CDATA[partitioning]]></category> <category><![CDATA[scaling]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/</guid> <description><![CDATA[<ul><li>Phil Hilderbrand of <a
href="http://www.theplatform.com/">thePlatform for Media, Inc</a> presents</li><li>classic partitioning</li></ul><ul><li>old school &#8211; union in the archive tables</li><li>auto partitioning and partition pruning</li><li>great for data warehousing</li><li>query performance improved</li><li>maintenance is clearly improved</li></ul><li>design issues in applying partitioning to OLTP (On-Line Transaction Processing)</li><ul><li>often id driven access vs date driven access</li><li>1 big clients could be 80% of the whole database, so there&#039;s a difficulty selecting partitioning schemes</li></ul><li><strong><a
href="http://dev.mysql.com/doc/refman/5.1/en/partitioning.html">partitioning is only supported starting from MySQL 5.1</a></strong></li><li>understanding the benefits</li><ul><li>reducing seek and scan set sizes</li><li>improving inserts/updates durations</li><li>making maintenance easier</li></ul><li>shows an EXPLAIN output for SELECTS on non-partitioned and partitioned tables. The results are significantly better for partitions</li><li>OPTIMIZE TABLE</li><p>...<div
class=clear></div> <a
href="http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<ul><li>Phil Hilderbrand of <a
href="http://www.theplatform.com/">thePlatform for Media, Inc</a> presents</li><li>classic partitioning</li><ul><li>old school &#8211; union in the archive tables</li><li>auto partitioning and partition pruning</li><li>great for data warehousing</li><li>query performance improved</li><li>maintenance is clearly improved</li></ul><li>design issues in applying partitioning to OLTP (On-Line Transaction Processing)</li><ul><li>often id driven access vs date driven access</li><li>1 big clients could be 80% of the whole database, so there&#039;s a difficulty selecting partitioning schemes</li></ul><li><strong><a
href="http://dev.mysql.com/doc/refman/5.1/en/partitioning.html">partitioning is only supported starting from MySQL 5.1</a></strong></li><li>understanding the benefits</li><ul><li>reducing seek and scan set sizes</li><li>improving inserts/updates durations</li><li>making maintenance easier</li></ul><li>shows an EXPLAIN output for SELECTS on non-partitioned and partitioned tables. The results are significantly better for partitions</li><li>OPTIMIZE TABLE on an unpartitioned table takes 1.14s</li><li>ALTER TABLE REBUILD PARTITION p1; on a partitioned table takes 0.03s</li><li>ALTER TABLE REBUILD PARTITION p1, p2, p3, p4, &#8230;, p10; takes 0.27s</li><li>design consideration</li><ul><li>table sizes and predicted growth patterns &#8211; partition big tables and also partition in advance, if you predict quick growth</li><li>access patterns &#8211; select what you want to partition by in a smart way, date, id, etc</li><li>keys and indexes &#8211; <a
href="http://dev.mysql.com/doc/refman/5.1/en/partitioning-limitations.html">there are a few restrictions</a>, foreign keys are currently not supported</li><li>availability requirements</li><li>manageability considerations &#8211; choosing to partition by hash if there is a TON of data</li><li>reuse / scope considerations &#8211; think ahead, think of the usage</li></ul><li>partitioning methods</li><ul><li><strong>range partitioning</strong></li><ul><li><strong>data usually accessed by date</strong></li><li>limited number of primary partitions needed</li><li>ordered intelligent keys</li><li>support sub partitions</li></ul><li><strong>list partitioning</strong></li><ul><li><strong>grouping data in partitions out of order (1,5,7 in partition x)</strong></li><li>limited number of primary partitions needed</li><li>intelligent keys</li><li>supports sub partitions</li></ul><li><strong>hash partitioning</strong></li><ul><li><strong>low maintenance</strong></li><li>works with limited or large number of partitions</li><li>non-intelligent keys (can work in some cases with intelligent keys)</li></ul><li><strong>key partitioning</strong></li><ul><li><strong>non-integer based partitioned keys (MySQL converts to int for you)</strong></li><li>low maintenance</li></ul></ul><li>hash partitioning example</li><ul><li>hash(mod%num_partitions)</li><li>in this example, Phil has stores, employees, and inventory. He decided to partition by store.</li><li><a
href="http://dev.mysql.com/doc/refman/5.1/en/partitioning-management-hash-key.html">http://dev.mysql.com/doc/refman/5.1/en/partitioning-management-hash-key.html</a></li><li>50 stores</li><ul><li>ALTER TABLE my_store PARTITION BY HASH(id) PARTITIONS 50;</li><li>ALTER TABLE my_employee PARTITION BY HASH(store_id) PARTITIONS 50;</li><li>ALTER TABLE my_inventory PARTITION BY HASH(store_id) PARTITIONS 50;</li></ul><li>ALTER obviously takes a long time and blocks (grr)</li><li><strong>adding partitions</strong></li><ul><li>ALTER TABLE my_store ADD PARTITION PARTITIONS 2;</li><li>ALTER TABLE my_employee ADD PARTITION PARTITIONS 2;</li><li>ALTER TABLE my_inventory ADD PARTITION PARTITIONS 2;</li></ul><li>ALTER takes some time again, though less (how come if the partitions are empty?)</li><li><strong>SELECT table_name, partition_name, table_rows FROM information_schema.partitions &#8230; shows info on partitions</strong></li><li><strong>remove 4 partitions</strong></li><ul><li>ALTER TABLE my_store COALESCE PARTITION 4;</li><li>ALTER TABLE my_employee COALESCE PARTITION 4;</li><li>ALTER TABLE my_inventory COALESCE PARTITION 4;</li></ul></ul></ul><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Conference+Liveblogging%3A+Applied+Partitioning+And+Scaling+your+%28OLTP%29+Database+System+%28Wednesday+11%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Conference+Liveblogging%3A+Applied+Partitioning+And+Scaling+your+%28OLTP%29+Database+System+%28Wednesday+11%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Conference+Liveblogging%3A+Applied+Partitioning+And+Scaling+your+%28OLTP%29+Database+System+%28Wednesday+11%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Conference+Liveblogging%3A+Applied+Partitioning+And+Scaling+your+%28OLTP%29+Database+System+%28Wednesday+11%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Conference+Liveblogging%3A+Applied+Partitioning+And+Scaling+your+%28OLTP%29+Database+System+%28Wednesday+11%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Conference+Liveblogging%3A+Applied+Partitioning+And+Scaling+your+%28OLTP%29+Database+System+%28Wednesday+11%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL+Conference+Liveblogging%3A+Applied+Partitioning+And+Scaling+your+%28OLTP%29+Database+System+%28Wednesday+11%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=MySQL%20Conference%20Liveblogging%3A%20Applied%20Partitioning%20And%20Scaling%20your%20%28OLTP%29%20Database%20System%20%28Wednesday%2011%3A55AM%29&amp;link=http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/&amp;notes=%20%20%20Phil%20Hilderbrand%20of%20thePlatform%20for%20Media%2C%20Inc%20presents%20%20%20%20classic%20partitioning%20%20%20%20%20%20%20%20%20old%20school%20-%20union%20in%20the%20archive%20tables%20%20%20%20%20%20auto%20partitioning%20and%20partition%20pruning%20%20%20%20%20%20great%20for%20data%20warehousing%20%20%20%20%20%20query%20performance%20improved%20%20%20%20%20%20maintenance%20is%20clearly%20improved%20%20%20%20%20%20%20design%20issues%20in&amp;short_link=http://bit.ly/axJDH5&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-performance-guide-for-mysql-cluster-tuesday-1050am/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: Performance Guide For MySQL Cluster (Tuesday 10:50AM)</a></li><li><a
href="http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/" rel="bookmark" title="March 18, 2009">MySQL Indexing Considerations Of Implementing A Priority Field In Your Application</a></li><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-the-future-of-mysql-tuesday-1155am-2/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: The Future Of MySQL (Tuesday 11:55AM)</a></li><li><a
href="http://beerpla.net/2008/04/17/mysql-conference-liveblogging-mysql-hidden-treasures-thursday-1155pm/" rel="bookmark" title="April 17, 2008">MySQL Conference Liveblogging: MySQL Hidden Treasures (Thursday 11:55PM)</a></li><li><a
href="http://beerpla.net/2008/04/15/mysql-conference-liveblogging-explain-demystified-tuesday-200p/" rel="bookmark" title="April 15, 2008">MySQL Conference Liveblogging: EXPLAIN Demystified (Tuesday 2:00PM)</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2008%2F04%2F16%2Fmysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am%2F&amp;title=MySQL%20Conference%20Liveblogging%3A%20Applied%20Partitioning%20And%20Scaling%20your%20%28OLTP%29%20Database%20System%20%28Wednesday%2011%3A55AM%29" id="wpa2a_2"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2008/04/16/mysql-conference-liveblogging-applied-partitioning-and-scaling-your-oltp-database-system-wednesday-1155am/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
