<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Small things are better</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/</link>
	<description>Everything about MySQL Performance</description>
	<lastBuildDate>Sat, 07 Nov 2009 18:35:44 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: pero on anything &#187; Blog Archive &#187; MySQL Partitioning on Application Side</title>
		<link>http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/comment-page-1/#comment-257276</link>
		<dc:creator>pero on anything &#187; Blog Archive &#187; MySQL Partitioning on Application Side</dc:creator>
		<pubDate>Wed, 26 Mar 2008 00:35:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/#comment-257276</guid>
		<description>[...] After following the scale up path (i.e. buy bigger boxes) for a while now, we definitely need to scale out as things start to become &#8220;unhandy&#8221; and simply HUGE. (See small things are better) [...]</description>
		<content:encoded><![CDATA[<p>[...] After following the scale up path (i.e. buy bigger boxes) for a while now, we definitely need to scale out as things start to become &#8220;unhandy&#8221; and simply HUGE. (See small things are better) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/comment-page-1/#comment-143095</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Fri, 06 Jul 2007 13:41:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/#comment-143095</guid>
		<description>lotso,

Read some internal docs. For example  MyISAM Static row format is pretty much  column values jam packed one after another.  So if you have  2 integers in the rows (NOT NULL) you  get  each row taking 8 bytes and  pretty much physical offsets used as row pointers. 

Now say you add 3rd in column and some rows become 12 bytes in length while other 8bytes...  MyISAM static row format can&#039;t handle it...</description>
		<content:encoded><![CDATA[<p>lotso,</p>
<p>Read some internal docs. For example  MyISAM Static row format is pretty much  column values jam packed one after another.  So if you have  2 integers in the rows (NOT NULL) you  get  each row taking 8 bytes and  pretty much physical offsets used as row pointers. </p>
<p>Now say you add 3rd in column and some rows become 12 bytes in length while other 8bytes&#8230;  MyISAM static row format can&#8217;t handle it&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lotso</title>
		<link>http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/comment-page-1/#comment-143093</link>
		<dc:creator>lotso</dc:creator>
		<pubDate>Fri, 06 Jul 2007 13:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/#comment-143093</guid>
		<description>Hi Peter,

After reading your post on http://www.mysqlperformanceblog.com/2006/06/09/why-mysql-could-be-slow-with-large-tables/ I was just very surprised when reading some of the comments that an alter table on a 500GB (say) table could take up to 2 days!! I have my tables as separate files/table (which I thought was a good idea, now I _know_ it&#039;s a good idea)

Actually, I don&#039;t get the statement regarding the column information NOT stored with each row. (can you point me to other resource to read up on? or even a google phrase)</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>After reading your post on <a href="http://www.mysqlperformanceblog.com/2006/06/09/why-mysql-could-be-slow-with-large-tables/" rel="nofollow">http://www.mysqlperformanceblog.com/2006/06/09/why-mysql-could-be-slow-with-large-tables/</a> I was just very surprised when reading some of the comments that an alter table on a 500GB (say) table could take up to 2 days!! I have my tables as separate files/table (which I thought was a good idea, now I _know_ it&#8217;s a good idea)</p>
<p>Actually, I don&#8217;t get the statement regarding the column information NOT stored with each row. (can you point me to other resource to read up on? or even a google phrase)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/comment-page-1/#comment-143088</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Fri, 06 Jul 2007 12:18:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/#comment-143088</guid>
		<description>lotso,

In many databases adding column is instant because it only changes meta data and as old rows (which do not have that column) are read the new column is returned as NULL or having default value. 

MySQL does not have this because many storage engine do not have column information stored with each row so it just copes data to the new table. 

MySQL indeed could keep read-write access to the existing table but this is not done now and it is not very trivial to implement.</description>
		<content:encoded><![CDATA[<p>lotso,</p>
<p>In many databases adding column is instant because it only changes meta data and as old rows (which do not have that column) are read the new column is returned as NULL or having default value. </p>
<p>MySQL does not have this because many storage engine do not have column information stored with each row so it just copes data to the new table. </p>
<p>MySQL indeed could keep read-write access to the existing table but this is not done now and it is not very trivial to implement.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lotso</title>
		<link>http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/comment-page-1/#comment-143084</link>
		<dc:creator>lotso</dc:creator>
		<pubDate>Fri, 06 Jul 2007 12:00:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/#comment-143084</guid>
		<description>peter,

coming back to your answer to sean&#039;s question. When I do an alter table (to add a new column), I see that a new table is being populated at the same time to add the new column. (BTW, why does it do this? Experience with MSSQL is that an alter table takes merely seconds to add a new column). I always presumed that it was doing such because it needs to ..

1. Maintain a read/write copy of the existing table
2. be able to still populate data
3. be able to switch over w/o any loss in data as soon as the task is finished.

Is this not true?</description>
		<content:encoded><![CDATA[<p>peter,</p>
<p>coming back to your answer to sean&#8217;s question. When I do an alter table (to add a new column), I see that a new table is being populated at the same time to add the new column. (BTW, why does it do this? Experience with MSSQL is that an alter table takes merely seconds to add a new column). I always presumed that it was doing such because it needs to ..</p>
<p>1. Maintain a read/write copy of the existing table<br />
2. be able to still populate data<br />
3. be able to switch over w/o any loss in data as soon as the task is finished.</p>
<p>Is this not true?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/comment-page-1/#comment-45366</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Tue, 06 Feb 2007 20:25:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/#comment-45366</guid>
		<description>Sean,

MySQL does not store updates. You simply can&#039;t update the table while ALTER TABLE is running. This is partially fixed for MySQL cluster and hopefully will be fixed for MySQL general but now plan to be read-only while running ALTER TABLE.</description>
		<content:encoded><![CDATA[<p>Sean,</p>
<p>MySQL does not store updates. You simply can&#8217;t update the table while ALTER TABLE is running. This is partially fixed for MySQL cluster and hopefully will be fixed for MySQL general but now plan to be read-only while running ALTER TABLE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sean</title>
		<link>http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/comment-page-1/#comment-37218</link>
		<dc:creator>sean</dc:creator>
		<pubDate>Fri, 26 Jan 2007 19:08:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/#comment-37218</guid>
		<description>Peter, 
I have a question about ALTER TABLE and how it logs incoming writes.  The documentation states that the &quot;ALTER TABLE works by making a temporary copy of the original table. The alteration is performed on the copy, and then the original table is deleted and the new one is renamed. While ALTER TABLE is executing, the original table is readable by other clients.  Updates and writes to the table are stalled until the new table is ready, and then are automatically redirected to the new table without any failed updates.&quot;

I&#039;m hoping you an elaborate on &#039;...are stalled until the new table is ready...&#039; I assume MySQL is storing these writes somewhere, either in memory or perhaps on disk but I&#039;m not sure.

Thanks.</description>
		<content:encoded><![CDATA[<p>Peter,<br />
I have a question about ALTER TABLE and how it logs incoming writes.  The documentation states that the &#8220;ALTER TABLE works by making a temporary copy of the original table. The alteration is performed on the copy, and then the original table is deleted and the new one is renamed. While ALTER TABLE is executing, the original table is readable by other clients.  Updates and writes to the table are stalled until the new table is ready, and then are automatically redirected to the new table without any failed updates.&#8221;</p>
<p>I&#8217;m hoping you an elaborate on &#8216;&#8230;are stalled until the new table is ready&#8230;&#8217; I assume MySQL is storing these writes somewhere, either in memory or perhaps on disk but I&#8217;m not sure.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/comment-page-1/#comment-26280</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Wed, 03 Jan 2007 14:00:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/#comment-26280</guid>
		<description>Piet,

Best way to check it is to benchmark it.  500 tables is not a lot so I would not see performance large penalty. 
You would get better data clustering especially with multiple tables - even with clustered Innodb tables you have indexes which may be unclustered.</description>
		<content:encoded><![CDATA[<p>Piet,</p>
<p>Best way to check it is to benchmark it.  500 tables is not a lot so I would not see performance large penalty.<br />
You would get better data clustering especially with multiple tables &#8211; even with clustered Innodb tables you have indexes which may be unclustered.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piet</title>
		<link>http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/comment-page-1/#comment-26149</link>
		<dc:creator>Piet</dc:creator>
		<pubDate>Tue, 02 Jan 2007 16:05:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/#comment-26149</guid>
		<description>How is performance affected when I&#039;d have eg private data for 500 customers in tables cust_1_data upto cust_500_data, instead of 1 big cust_data table with a customer_id column ? 

Doesn&#039;t having lots of tables give a performance penalty ? And how does it compare to a performance increase for having smaller tables ?

A select clause for eg cust 33 would then be &#039;select * from cust_33_data&#039;, instead of &#039;select * from cust_data where customer_id = 33&#039;.

I&#039;ve often wondered about this.</description>
		<content:encoded><![CDATA[<p>How is performance affected when I&#8217;d have eg private data for 500 customers in tables cust_1_data upto cust_500_data, instead of 1 big cust_data table with a customer_id column ? </p>
<p>Doesn&#8217;t having lots of tables give a performance penalty ? And how does it compare to a performance increase for having smaller tables ?</p>
<p>A select clause for eg cust 33 would then be &#8217;select * from cust_33_data&#8217;, instead of &#8217;select * from cust_data where customer_id = 33&#8242;.</p>
<p>I&#8217;ve often wondered about this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/comment-page-1/#comment-5305</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Fri, 20 Oct 2006 14:51:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/10/08/small-things-are-better/#comment-5305</guid>
		<description>Peter, 

Taking offline is a broad term here. In some cases you can block chunk of data on application level in others you can 
simply run ALTER TABLE as you need. Yes it will lock some clients for a while but only few and for limited time.</description>
		<content:encoded><![CDATA[<p>Peter, </p>
<p>Taking offline is a broad term here. In some cases you can block chunk of data on application level in others you can<br />
simply run ALTER TABLE as you need. Yes it will lock some clients for a while but only few and for limited time.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
