<?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: How fast can you sort data with MySQL ?</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/</link>
	<description>Percona&#039;s MySQL &#38; InnoDB performance and scalability blog</description>
	<lastBuildDate>Sat, 11 Feb 2012 16:45:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Avi</title>
		<link>http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/comment-page-1/#comment-773596</link>
		<dc:creator>Avi</dc:creator>
		<pubDate>Wed, 08 Sep 2010 09:32:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/#comment-773596</guid>
		<description>Hi
Is there any way that I can sort in numeric mode or in string mode.....?????
Let me know any if possible.
Thanks</description>
		<content:encoded><![CDATA[<p>Hi<br />
Is there any way that I can sort in numeric mode or in string mode&#8230;..?????<br />
Let me know any if possible.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pascal</title>
		<link>http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/comment-page-1/#comment-769951</link>
		<dc:creator>pascal</dc:creator>
		<pubDate>Sat, 24 Jul 2010 08:04:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/#comment-769951</guid>
		<description>I second other commenters asking for commented My.cnf files from the magicians of this blog! that would certainly be very interesting and useful.</description>
		<content:encoded><![CDATA[<p>I second other commenters asking for commented My.cnf files from the magicians of this blog! that would certainly be very interesting and useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: michael.maçš„å¥‹æ–—äººç”Ÿ &#187; Blog Archive &#187; ï¼ˆè½¬è´´ï¼‰æ ¹æ®statusä¿¡æ¯å¯¹MySQLæœåŠ¡å™¨è¿›è¡Œä¼˜åŒ–</title>
		<link>http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/comment-page-1/#comment-625576</link>
		<dc:creator>michael.maçš„å¥‹æ–—äººç”Ÿ &#187; Blog Archive &#187; ï¼ˆè½¬è´´ï¼‰æ ¹æ®statusä¿¡æ¯å¯¹MySQLæœåŠ¡å™¨è¿›è¡Œä¼˜åŒ–</dc:creator>
		<pubDate>Fri, 07 Aug 2009 06:39:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/#comment-625576</guid>
		<description>[...] Sort_merge_passes åŒ…æ‹¬ä¸¤æ­¥ã€‚MySQL é¦–å…ˆä¼šå°è¯•åœ¨å†…å­˜ä¸­åšæŽ’åºï¼Œä½¿ç”¨çš„å†…å­˜å¤§å°ç”±ç³»ç»Ÿå˜é‡ Sort_buffer_size å†³å®šï¼Œå¦‚æžœå®ƒçš„å¤§å°ä¸å¤ŸæŠŠæ‰€æœ‰çš„è®°å½•éƒ½è¯»åˆ°å†…å­˜ä¸­ï¼ŒMySQL å°±ä¼šæŠŠæ¯æ¬¡åœ¨å†…å­˜ä¸­æŽ’åºçš„ç»“æžœå­˜åˆ°ä¸´æ—¶æ–‡ä»¶ä¸­ï¼Œç­‰ MySQL æ‰¾åˆ°æ‰€æœ‰è®°å½•ä¹‹åŽï¼Œå†æŠŠä¸´æ—¶æ–‡ä»¶ä¸­çš„è®°å½•åšä¸€æ¬¡æŽ’åºã€‚è¿™å†æ¬¡æŽ’åºå°±ä¼šå¢žåŠ  Sort_merge_passesã€‚å®žé™…ä¸Šï¼ŒMySQL ä¼šç”¨å¦ä¸€ä¸ªä¸´æ—¶æ–‡ä»¶æ¥å­˜å†æ¬¡æŽ’åºçš„ç»“æžœï¼Œæ‰€ä»¥é€šå¸¸ä¼šçœ‹åˆ° Sort_merge_passes å¢žåŠ çš„æ•°å€¼æ˜¯å»ºä¸´æ—¶æ–‡ä»¶æ•°çš„ä¸¤å€ã€‚å› ä¸ºç”¨åˆ°äº†ä¸´æ—¶æ–‡ä»¶ï¼Œæ‰€ä»¥é€Ÿåº¦å¯èƒ½ä¼šæ¯”è¾ƒæ…¢ï¼Œå¢žåŠ  Sort_buffer_size ä¼šå‡å°‘ Sort_merge_passes å’Œ åˆ›å»ºä¸´æ—¶æ–‡ä»¶çš„æ¬¡æ•°ã€‚ä½†ç›²ç›®çš„å¢žåŠ  Sort_buffer_size å¹¶ä¸ä¸€å®šèƒ½æé«˜é€Ÿåº¦ï¼Œè§ How fast can you sort data with MySQL?ï¼ˆå¼•è‡ªhttp://qroom.blogspot.com/2007/09/mysql-select-sort.htmlï¼Œè²Œä¼¼è¢«å¢™ï¼‰ [...]</description>
		<content:encoded><![CDATA[<p>[...] Sort_merge_passes åŒ…æ‹¬ä¸¤æ­¥ã€‚MySQL é¦–å…ˆä¼šå°è¯•åœ¨å†…å­˜ä¸­åšæŽ’åºï¼Œä½¿ç”¨çš„å†…å­˜å¤§å°ç”±ç³»ç»Ÿå˜é‡ Sort_buffer_size å†³å®šï¼Œå¦‚æžœå®ƒçš„å¤§å°ä¸å¤ŸæŠŠæ‰€æœ‰çš„è®°å½•éƒ½è¯»åˆ°å†…å­˜ä¸­ï¼ŒMySQL å°±ä¼šæŠŠæ¯æ¬¡åœ¨å†…å­˜ä¸­æŽ’åºçš„ç»“æžœå­˜åˆ°ä¸´æ—¶æ–‡ä»¶ä¸­ï¼Œç­‰ MySQL æ‰¾åˆ°æ‰€æœ‰è®°å½•ä¹‹åŽï¼Œå†æŠŠä¸´æ—¶æ–‡ä»¶ä¸­çš„è®°å½•åšä¸€æ¬¡æŽ’åºã€‚è¿™å†æ¬¡æŽ’åºå°±ä¼šå¢žåŠ  Sort_merge_passesã€‚å®žé™…ä¸Šï¼ŒMySQL ä¼šç”¨å¦ä¸€ä¸ªä¸´æ—¶æ–‡ä»¶æ¥å­˜å†æ¬¡æŽ’åºçš„ç»“æžœï¼Œæ‰€ä»¥é€šå¸¸ä¼šçœ‹åˆ° Sort_merge_passes å¢žåŠ çš„æ•°å€¼æ˜¯å»ºä¸´æ—¶æ–‡ä»¶æ•°çš„ä¸¤å€ã€‚å› ä¸ºç”¨åˆ°äº†ä¸´æ—¶æ–‡ä»¶ï¼Œæ‰€ä»¥é€Ÿåº¦å¯èƒ½ä¼šæ¯”è¾ƒæ…¢ï¼Œå¢žåŠ  Sort_buffer_size ä¼šå‡å°‘ Sort_merge_passes å’Œ åˆ›å»ºä¸´æ—¶æ–‡ä»¶çš„æ¬¡æ•°ã€‚ä½†ç›²ç›®çš„å¢žåŠ  Sort_buffer_size å¹¶ä¸ä¸€å®šèƒ½æé«˜é€Ÿåº¦ï¼Œè§ How fast can you sort data with MySQL?ï¼ˆå¼•è‡ªhttp://qroom.blogspot.com/2007/09/mysql-select-sort.htmlï¼Œè²Œä¼¼è¢«å¢™ï¼‰ [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: æ ¹æ®statusä¿¡æ¯å¯¹MySQLæœåŠ¡å™¨è¿›è¡Œä¼˜åŒ–ï¼ˆäºŒï¼‰ &#187; è¶…ç¾¤.comçš„åšå®¢</title>
		<link>http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/comment-page-1/#comment-518208</link>
		<dc:creator>æ ¹æ®statusä¿¡æ¯å¯¹MySQLæœåŠ¡å™¨è¿›è¡Œä¼˜åŒ–ï¼ˆäºŒï¼‰ &#187; è¶…ç¾¤.comçš„åšå®¢</dc:creator>
		<pubDate>Wed, 25 Mar 2009 07:08:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/#comment-518208</guid>
		<description>[...] Sort_merge_passes åŒ…æ‹¬ä¸¤æ­¥ã€‚MySQL é¦–å…ˆä¼šå°è¯•åœ¨å†…å­˜ä¸­åšæŽ’åºï¼Œä½¿ç”¨çš„å†…å­˜å¤§å°ç”±ç³»ç»Ÿå˜é‡ Sort_buffer_size å†³å®šï¼Œå¦‚æžœå®ƒçš„å¤§å°ä¸å¤ŸæŠŠæ‰€æœ‰çš„è®°å½•éƒ½è¯»åˆ°å†…å­˜ä¸­ï¼ŒMySQL å°±ä¼šæŠŠæ¯æ¬¡åœ¨å†…å­˜ä¸­æŽ’åºçš„ç»“æžœå­˜åˆ°ä¸´æ—¶æ–‡ä»¶ä¸­ï¼Œç­‰ MySQL æ‰¾åˆ°æ‰€æœ‰è®°å½•ä¹‹åŽï¼Œå†æŠŠä¸´æ—¶æ–‡ä»¶ä¸­çš„è®°å½•åšä¸€æ¬¡æŽ’åºã€‚è¿™å†æ¬¡æŽ’åºå°±ä¼šå¢žåŠ  Sort_merge_passesã€‚å®žé™…ä¸Šï¼ŒMySQL ä¼šç”¨å¦ä¸€ä¸ªä¸´æ—¶æ–‡ä»¶æ¥å­˜å†æ¬¡æŽ’åºçš„ç»“æžœï¼Œæ‰€ä»¥é€šå¸¸ä¼šçœ‹åˆ° Sort_merge_passes å¢žåŠ çš„æ•°å€¼æ˜¯å»ºä¸´æ—¶æ–‡ä»¶æ•°çš„ä¸¤å€ã€‚å› ä¸ºç”¨åˆ°äº†ä¸´æ—¶æ–‡ä»¶ï¼Œæ‰€ä»¥é€Ÿåº¦å¯èƒ½ä¼šæ¯”è¾ƒæ…¢ï¼Œå¢žåŠ  Sort_buffer_size ä¼šå‡å°‘ Sort_merge_passes å’Œ åˆ›å»ºä¸´æ—¶æ–‡ä»¶çš„æ¬¡æ•°ã€‚ä½†ç›²ç›®çš„å¢žåŠ  Sort_buffer_size å¹¶ä¸ä¸€å®šèƒ½æé«˜é€Ÿåº¦ï¼Œè§ How fast can you sort data with MySQL?ï¼ˆå¼•è‡ªhttp://qroom.blogspot.com/2007/09/mysql-select-sort.htmlï¼Œè²Œä¼¼è¢«å¢™ï¼‰ [...]</description>
		<content:encoded><![CDATA[<p>[...] Sort_merge_passes åŒ…æ‹¬ä¸¤æ­¥ã€‚MySQL é¦–å…ˆä¼šå°è¯•åœ¨å†…å­˜ä¸­åšæŽ’åºï¼Œä½¿ç”¨çš„å†…å­˜å¤§å°ç”±ç³»ç»Ÿå˜é‡ Sort_buffer_size å†³å®šï¼Œå¦‚æžœå®ƒçš„å¤§å°ä¸å¤ŸæŠŠæ‰€æœ‰çš„è®°å½•éƒ½è¯»åˆ°å†…å­˜ä¸­ï¼ŒMySQL å°±ä¼šæŠŠæ¯æ¬¡åœ¨å†…å­˜ä¸­æŽ’åºçš„ç»“æžœå­˜åˆ°ä¸´æ—¶æ–‡ä»¶ä¸­ï¼Œç­‰ MySQL æ‰¾åˆ°æ‰€æœ‰è®°å½•ä¹‹åŽï¼Œå†æŠŠä¸´æ—¶æ–‡ä»¶ä¸­çš„è®°å½•åšä¸€æ¬¡æŽ’åºã€‚è¿™å†æ¬¡æŽ’åºå°±ä¼šå¢žåŠ  Sort_merge_passesã€‚å®žé™…ä¸Šï¼ŒMySQL ä¼šç”¨å¦ä¸€ä¸ªä¸´æ—¶æ–‡ä»¶æ¥å­˜å†æ¬¡æŽ’åºçš„ç»“æžœï¼Œæ‰€ä»¥é€šå¸¸ä¼šçœ‹åˆ° Sort_merge_passes å¢žåŠ çš„æ•°å€¼æ˜¯å»ºä¸´æ—¶æ–‡ä»¶æ•°çš„ä¸¤å€ã€‚å› ä¸ºç”¨åˆ°äº†ä¸´æ—¶æ–‡ä»¶ï¼Œæ‰€ä»¥é€Ÿåº¦å¯èƒ½ä¼šæ¯”è¾ƒæ…¢ï¼Œå¢žåŠ  Sort_buffer_size ä¼šå‡å°‘ Sort_merge_passes å’Œ åˆ›å»ºä¸´æ—¶æ–‡ä»¶çš„æ¬¡æ•°ã€‚ä½†ç›²ç›®çš„å¢žåŠ  Sort_buffer_size å¹¶ä¸ä¸€å®šèƒ½æé«˜é€Ÿåº¦ï¼Œè§ How fast can you sort data with MySQL?ï¼ˆå¼•è‡ªhttp://qroom.blogspot.com/2007/09/mysql-select-sort.htmlï¼Œè²Œä¼¼è¢«å¢™ï¼‰ [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Project 2061 Techlog &#187; Optimizing MySQL Server Runtime Parameters</title>
		<link>http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/comment-page-1/#comment-296421</link>
		<dc:creator>Project 2061 Techlog &#187; Optimizing MySQL Server Runtime Parameters</dc:creator>
		<pubDate>Wed, 07 May 2008 18:55:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/#comment-296421</guid>
		<description>[...] MySQL Performance Blog: How fast can you sort data with MySQL? [...]</description>
		<content:encoded><![CDATA[<p>[...] MySQL Performance Blog: How fast can you sort data with MySQL? [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/comment-page-1/#comment-171970</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Tue, 25 Sep 2007 05:31:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/#comment-171970</guid>
		<description>Further to my last question..

As described in this blog post, a table scan with order by/limit does a very fast sort if you want to get the top-most rows .. but I find it useless if you want to use it to create a full ordered insert (for example) for innodb.
My large table spends hours &#039;sorting result&#039;, even though I can get top 20 results within 15 minutes. I wonder if there are some short-cuts taken by mysql where limit is used. Perhaps a table-scan, with a running best-of list, for example. That would not then be a sort, would it?

In order to do an ordered bulk insert to innodb by PK I am resorting to external sort of a file with unix sort then feeding it with batch inserts, rather than feeding it to myisam then converting, or feeding to myisam then sort .. order by .. insert, or feeding un-ordered PK to innodb directly then doing alter table engine=innodb to &quot;defragment&quot; PK.

Am I on the right track?</description>
		<content:encoded><![CDATA[<p>Further to my last question..</p>
<p>As described in this blog post, a table scan with order by/limit does a very fast sort if you want to get the top-most rows .. but I find it useless if you want to use it to create a full ordered insert (for example) for innodb.<br />
My large table spends hours &#8216;sorting result&#8217;, even though I can get top 20 results within 15 minutes. I wonder if there are some short-cuts taken by mysql where limit is used. Perhaps a table-scan, with a running best-of list, for example. That would not then be a sort, would it?</p>
<p>In order to do an ordered bulk insert to innodb by PK I am resorting to external sort of a file with unix sort then feeding it with batch inserts, rather than feeding it to myisam then converting, or feeding to myisam then sort .. order by .. insert, or feeding un-ordered PK to innodb directly then doing alter table engine=innodb to &#8220;defragment&#8221; PK.</p>
<p>Am I on the right track?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/comment-page-1/#comment-171897</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Tue, 25 Sep 2007 02:04:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/#comment-171897</guid>
		<description>On this subject.. if you have a huge un-ordered myisam table and wish to get it into sort order before dumping it to INNODB, which is going to be faster?

a) Add an index on column to be sorted and select by that index
b) Dump the data to flat file and sort using unix sort then re-import
c) Select using table-scan and sort as per your example
d) alter to innodb with primary key (which is the objective anyway)

I&#039;m currently doing (a) but I&#039;m wondering if this is a big waste of time.</description>
		<content:encoded><![CDATA[<p>On this subject.. if you have a huge un-ordered myisam table and wish to get it into sort order before dumping it to INNODB, which is going to be faster?</p>
<p>a) Add an index on column to be sorted and select by that index<br />
b) Dump the data to flat file and sort using unix sort then re-import<br />
c) Select using table-scan and sort as per your example<br />
d) alter to innodb with primary key (which is the objective anyway)</p>
<p>I&#8217;m currently doing (a) but I&#8217;m wondering if this is a big waste of time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/comment-page-1/#comment-169796</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Wed, 19 Sep 2007 10:20:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/#comment-169796</guid>
		<description>Lachlan,

Indeed it can affect things.  And there are more variables like table structure of course - I have not tested these yet.</description>
		<content:encoded><![CDATA[<p>Lachlan,</p>
<p>Indeed it can affect things.  And there are more variables like table structure of course &#8211; I have not tested these yet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lachlan Mulcahy</title>
		<link>http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/comment-page-1/#comment-169703</link>
		<dc:creator>Lachlan Mulcahy</dc:creator>
		<pubDate>Wed, 19 Sep 2007 05:40:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/#comment-169703</guid>
		<description>Hi Peter,

I wonder how the size of this buffer would affect real loaded systems?

Obviously on many real systems disk IO comes into the equation and then disk seek time can start playing a big factor. 

I would be interested to see if the results change in this kind of situation.

Kind Regards,
Lachlan</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>I wonder how the size of this buffer would affect real loaded systems?</p>
<p>Obviously on many real systems disk IO comes into the equation and then disk seek time can start playing a big factor. </p>
<p>I would be interested to see if the results change in this kind of situation.</p>
<p>Kind Regards,<br />
Lachlan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MySQL Performance Blog &#187; MySQL: what read_buffer_size value is optimal ?</title>
		<link>http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/comment-page-1/#comment-169054</link>
		<dc:creator>MySQL Performance Blog &#187; MySQL: what read_buffer_size value is optimal ?</dc:creator>
		<pubDate>Mon, 17 Sep 2007 14:41:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/08/18/how-fast-can-you-sort-data-with-mysql/#comment-169054</guid>
		<description>[...] benchmarks and performance research. I just recently wrote about rather surprising results with sort performance and today I&#039;ve discovered even read_buffer_size selection may be less than [...]</description>
		<content:encoded><![CDATA[<p>[...] benchmarks and performance research. I just recently wrote about rather surprising results with sort performance and today I&#8217;ve discovered even read_buffer_size selection may be less than [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

