<?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>壞蛋的部落格 &#187; order by</title>
	<atom:link href="http://www.pigo.idv.tw/archives/tag/order-by/feed" rel="self" type="application/rss+xml" />
	<link>http://www.pigo.idv.tw</link>
	<description>嘿嘿嘿嘿 .....</description>
	<lastBuildDate>Sat, 04 Feb 2012 12:35:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>善用 sub query 優化 order by limit</title>
		<link>http://www.pigo.idv.tw/archives/390</link>
		<comments>http://www.pigo.idv.tw/archives/390#comments</comments>
		<pubDate>Mon, 21 Sep 2009 17:14:34 +0000</pubDate>
		<dc:creator>pigo</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[limit]]></category>
		<category><![CDATA[order by]]></category>
		<category><![CDATA[sub query]]></category>
		<category><![CDATA[子查詢]]></category>

		<guid isPermaLink="false">http://www.pigo.idv.tw/?p=390</guid>
		<description><![CDATA[假設 , 我們有個 Table 叫 test ,&#160; 有 20 萬筆記錄 , test 有 20 個欄位好了&#160; , 其中有一個欄位 post_time 有建立索引可以排序用的 , 而有個主鍵 id 下一道指令 ?View Code SQLSELECT * FROM test ORDER BY post_time DESC LIMIT 150000,10 這道指令看似簡單 , 理論上應該跑很快 ~ 實際上卻不然 , 也許跑上 20 秒 , 因為這牽扯到 MySQL Server 的 sort buffer 大小 ,&#160; 因為這道指令可能會因為 buffer [...]]]></description>
		<wfw:commentRss>http://www.pigo.idv.tw/archives/390/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

