<?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>Sound Alliance Developers &#187; functional partitioning</title>
	<atom:link href="http://developer.thesoundalliance.net/tag/functional-partitioning/feed/" rel="self" type="application/rss+xml" />
	<link>http://developer.thesoundalliance.net</link>
	<description>New from the TSA Engine Room</description>
	<lastBuildDate>Thu, 23 Sep 2010 08:37:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Functional Partitioning (Part 1)</title>
		<link>http://developer.thesoundalliance.net/2009/08/31/functional-partitioning-part-1/</link>
		<comments>http://developer.thesoundalliance.net/2009/08/31/functional-partitioning-part-1/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 01:35:01 +0000</pubDate>
		<dc:creator>Tim Massey</dc:creator>
				<category><![CDATA[BackEnd]]></category>
		<category><![CDATA[Environment]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[functional partitioning]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[scaling]]></category>
		<category><![CDATA[techniques]]></category>

		<guid isPermaLink="false">http://developer.thesoundalliance.net/?p=59</guid>
		<description><![CDATA[Recently we performed some Functional Partitioning on our databases, the following series of articles takes you through how we did it, why &#38; some of the the lessons we learned along the way. Enjoy.]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<p style="margin-bottom: 0cm">
<p style="margin-bottom: 0cm">
<p style="margin-bottom: 0cm"><strong>Part 1 – The Objective:</strong></p>
<p style="margin-bottom: 0cm">
<p style="margin-bottom: 0cm">We recently set ourselves the goal of streamlining the database for ease of management &amp; development. For those who&#8217;s production databases are in the multi-gigabyte size category, you will know what a drama it is to get the dev environment looking as similar as possible to live.</p>
<p style="margin-bottom: 0cm">
<p style="margin-bottom: 0cm">Anyway, our sites get a lot of visits which we like to log and make pretty graphs from. The downside of this from a system maintenance &amp; performance perspective is that a lot of data gets generated. When I say a lot I&#8217;m talking gigabytes of space housed in the database, just for the site visit stats.</p>
<p style="margin-bottom: 0cm"><span id="more-59"></span></p>
<p style="margin-bottom: 0cm">
<p style="margin-bottom: 0cm">So, with this in mind we focussed on the stats related tables in our streamlining efforts. We decided to undertake a flavour of Functional Partitioning (FP). I say “flavour” as this strategy can be applied in a variety of ways and to various degrees.</p>
<p style="margin-bottom: 0cm">
<p style="margin-bottom: 0cm">In most cases you perform FP if there is a performance bottleneck in the IO. In our case the objective was to create a more portable (data size) database. I realise it is possible to selectively export/import tables but really, we just wanted a small-as-possible snapshot of the whole database that could easily be imported back into the dev environment.</p>
<p style="margin-bottom: 0cm">
<p style="margin-bottom: 0cm">As I mentioned, Functional Partitioning works on a sliding scale in terms of its implementation. In the fullest degree of FP you dedicate an entire db server to the functionally partitioned data. For example, the system would have a separate server for content, images and whatever other different functional areas you needed. In our situation we didn&#8217;t go as far as a new server for the partitioned data, only creating a new database on the same server for the purpose.</p>
<p style="margin-bottom: 0cm">
<p style="margin-bottom: 0cm">The next step in this process was deciding how to best get the data there, then adjusting the application to start recording the visits in the new location (without data loss or downtime).</p>
<p style="margin-bottom: 0cm">
<p style="margin-bottom: 0cm">In order to tackle this problem we identified 3 phases:</p>
<p style="margin-bottom: 0cm">
<ul>
<li>
<p style="margin-bottom: 0cm">Migrate the data into the new db 	(preparation).</p>
</li>
<li>
<p style="margin-bottom: 0cm">Change the live code to look &amp; 	log in the new location (time sensitive).</p>
</li>
<li>
<p style="margin-bottom: 0cm">Tidy up the system (post release).</p>
</li>
</ul>
<p style="margin-bottom: 0cm">
<p style="margin-bottom: 0cm">I&#8217;ll go into more detail on each of these phases in the next instalment of this post&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://developer.thesoundalliance.net/2009/08/31/functional-partitioning-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

