<?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"
	>
<channel>
	<title>Comments on: Learning about MySQL Table Fragmentation</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/</link>
	<description>Everything about MySQL Performance</description>
	<pubDate>Tue, 02 Dec 2008 20:22:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-386531</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Wed, 19 Nov 2008 15:41:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-386531</guid>
		<description>Steven,

It really depends. In some cases when there is prevailing access method which is different from physical row layout it  can make a huge difference.   In other cases one may not know prevailing access or may not have time to run alter table order by regularly.  Running ALTER TABLE ... ORDER BY ...  is often much slower than OPTIMIZE TABLE.</description>
		<content:encoded><![CDATA[<p>Steven,</p>
<p>It really depends. In some cases when there is prevailing access method which is different from physical row layout it  can make a huge difference.   In other cases one may not know prevailing access or may not have time to run alter table order by regularly.  Running ALTER TABLE &#8230; ORDER BY &#8230;  is often much slower than OPTIMIZE TABLE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Roussey</title>
		<link>http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-385997</link>
		<dc:creator>Steven Roussey</dc:creator>
		<pubDate>Wed, 19 Nov 2008 06:04:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-385997</guid>
		<description>Forget optimize table -- better to use alter table order by xxx and force an arrangement by columns that you most often query against.</description>
		<content:encoded><![CDATA[<p>Forget optimize table &#8212; better to use alter table order by xxx and force an arrangement by columns that you most often query against.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-298267</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Tue, 13 May 2008 05:01:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-298267</guid>
		<description>Peter,

Good catch though it does not have anything to do with table fragmentation. Simply  if you're querying number of rows in table for Innodb it performs estimation - this estimation requires several random dives in the clustered index, which causes IO for large table sizes.</description>
		<content:encoded><![CDATA[<p>Peter,</p>
<p>Good catch though it does not have anything to do with table fragmentation. Simply  if you&#8217;re querying number of rows in table for Innodb it performs estimation - this estimation requires several random dives in the clustered index, which causes IO for large table sizes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Laursen</title>
		<link>http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-297244</link>
		<dc:creator>Peter Laursen</dc:creator>
		<pubDate>Sun, 11 May 2008 08:40:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-297244</guid>
		<description>I posted this to MySQL:
http://bugs.mysql.com/bug.php?id=36588

Originally we had this discussion in our Forums:
http://www.webyog.com/forums//index.php?showtopic=3925

Is this related, you think.  Or am I overlooking something basic?


The culprit is that also SHOW TABLE STATUS can be very slow.  Same for queries to Information_Schema fetching the same information.  But it seems not always so - I have tried on my laptop and here it is not the case. Framentation makes the difference?</description>
		<content:encoded><![CDATA[<p>I posted this to MySQL:<br />
<a href="http://bugs.mysql.com/bug.php?id=36588" rel="nofollow">http://bugs.mysql.com/bug.php?id=36588</a></p>
<p>Originally we had this discussion in our Forums:<br />
<a href="http://www.webyog.com/forums//index.php?showtopic=3925" rel="nofollow">http://www.webyog.com/forums//index.php?showtopic=3925</a></p>
<p>Is this related, you think.  Or am I overlooking something basic?</p>
<p>The culprit is that also SHOW TABLE STATUS can be very slow.  Same for queries to Information_Schema fetching the same information.  But it seems not always so - I have tried on my laptop and here it is not the case. Framentation makes the difference?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-296212</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Wed, 07 May 2008 06:33:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-296212</guid>
		<description>Jay,

Your method will require temporary table creation in MySQL which can be very large so it is better to use different query patterns as highlighted.</description>
		<content:encoded><![CDATA[<p>Jay,</p>
<p>Your method will require temporary table creation in MySQL which can be very large so it is better to use different query patterns as highlighted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay Paroline</title>
		<link>http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-296098</link>
		<dc:creator>Jay Paroline</dc:creator>
		<pubDate>Wed, 07 May 2008 02:47:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-296098</guid>
		<description>I have been using a similar method to 'warm up the cache' so to speak: SELECT 1 FROM (SELECT * FROM tablename) x LIMIT 1;
Is there any benefit from doing it your way over this way or are they pretty much the same thing?</description>
		<content:encoded><![CDATA[<p>I have been using a similar method to &#8216;warm up the cache&#8217; so to speak: SELECT 1 FROM (SELECT * FROM tablename) x LIMIT 1;<br />
Is there any benefit from doing it your way over this way or are they pretty much the same thing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stewart Smith</title>
		<link>http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-295130</link>
		<dc:creator>Stewart Smith</dc:creator>
		<pubDate>Tue, 06 May 2008 03:41:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-295130</guid>
		<description>You may want to check out filefrag, this will tell you (rather quickly) how many fragments your file has. This works on just about any file system (on linux).

If running XFS, xfs_bmap gives you much more detailed output. xfs_fsr will also (online) defragment the file. You can also use xfs_io to reserve space (resvspc) for files if you want to do this from the start.</description>
		<content:encoded><![CDATA[<p>You may want to check out filefrag, this will tell you (rather quickly) how many fragments your file has. This works on just about any file system (on linux).</p>
<p>If running XFS, xfs_bmap gives you much more detailed output. xfs_fsr will also (online) defragment the file. You can also use xfs_io to reserve space (resvspc) for files if you want to do this from the start.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-294690</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Mon, 05 May 2008 20:24:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-294690</guid>
		<description>Dathan,

Thanks - Indeed optimize/copy may not succeed defragmenting but this is as much as we can succeed trying to defragment something from application level.
Even if you do not have enough contiguos blocks in single piece the new file often would still have smaller number of fragments than old one.</description>
		<content:encoded><![CDATA[<p>Dathan,</p>
<p>Thanks - Indeed optimize/copy may not succeed defragmenting but this is as much as we can succeed trying to defragment something from application level.<br />
Even if you do not have enough contiguos blocks in single piece the new file often would still have smaller number of fragments than old one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dathan Vance Pattishall</title>
		<link>http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-294649</link>
		<dc:creator>Dathan Vance Pattishall</dc:creator>
		<pubDate>Mon, 05 May 2008 19:26:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-294649</guid>
		<description>just a note about "Optimize table" fixing file fragmentation and table space fragmentation: For ext-3 this is only true if there is enough contiguous blocks left on the disk for the new file created by optimize table-while the table space fragmentation is still solved with Optimize table.


http://mysqldba.blogspot.com/2008/01/filefrag-dbas-best-friend.html</description>
		<content:encoded><![CDATA[<p>just a note about &#8220;Optimize table&#8221; fixing file fragmentation and table space fragmentation: For ext-3 this is only true if there is enough contiguous blocks left on the disk for the new file created by optimize table-while the table space fragmentation is still solved with Optimize table.</p>
<p><a href="http://mysqldba.blogspot.com/2008/01/filefrag-dbas-best-friend.html" rel="nofollow">http://mysqldba.blogspot.com/2008/01/filefrag-dbas-best-friend.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-293110</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Sun, 04 May 2008 04:47:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/05/01/learning-about-mysql-table-fragmentation/#comment-293110</guid>
		<description>Kevin,

I think non working read-ahead is result not the cause - if you have requests coming in a way read-ahead is not triggered it does not work :)</description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>I think non working read-ahead is result not the cause - if you have requests coming in a way read-ahead is not triggered it does not work <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
</channel>
</rss>
