<?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>老布丁的Central Perk</title>
	<atom:link href="http://www.heysql.com/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.heysql.com/wordpress</link>
	<description>MySQL\Linux\Twitter控,自学途中</description>
	<lastBuildDate>Fri, 20 Aug 2010 03:22:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>支付宝-技术运营服务部-期待您的加入</title>
		<link>http://www.heysql.com/wordpress/other/alipay-job/</link>
		<comments>http://www.heysql.com/wordpress/other/alipay-job/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 03:22:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[琐碎的其他]]></category>

		<guid isPermaLink="false">http://www.heysql.com/wordpress/?p=153</guid>
		<description><![CDATA[如果对下面的岗位有兴趣，请将简历发送到我的邮箱：heysql.com@gmail.com
主题注明应聘岗位，如果我觉得合适我会帮您内部推荐。
一、        招聘岗位和人数
岗位                                              人数 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>如果对下面的岗位有兴趣，请将简历发送到我的邮箱：heysql.com@gmail.com<br />
主题注明应聘岗位，如果我觉得合适我会帮您内部推荐。</strong><br />
一、        招聘岗位和人数<br />
岗位                                              人数                            部门<br />
采购与资产管理员                                2                     支付宝技术部-运营服务部-应用管理组<br />
研发与测试环境管理工程师                      3                     支付宝技术部-运营服务部-应用管理组<br />
网站运行监控工程师                              3                    支付宝技术部-运营服务部-应用管理组<br />
应用运维工程师                                   2                     支付宝技术部-运营服务部-应用管理组<br />
技术服务台工程师                                1                     支付宝技术部-运营服务部-应用管理组<br />
行为审计专员                                     1                     支付宝技术部-运营服务部-安全中心</p>
<p>二、        岗位描述<br />
岗位：采购与资产管理员<br />
人数：2人<br />
工作地点：杭州<br />
岗位职责：<br />
1、   负责预算编制文案工作，以及预算执行、跟踪、分析；<br />
2、   根据预算和业务要求，进行采购审核、提请、跟踪和管理；<br />
3、   负责网站运行资产、设备管理，包括采购验收、入库、启用、维保、下线、报废等资产生命周期管理；<br />
4、   负责采购、资产管理相关制度的修改、完善，流程的完善；<br />
5、   负责资产设备成本分析和管理，有效控制资产成本。<br />
岗位要求：<br />
1、   熟悉Office使用，具有较好的文档能力，具有IT设备采购、资产管理工作经验的优先；<br />
2、   具有良好的沟通能力、快速学习能力和合作能力；<br />
3、   工作细致、认真，能吃苦耐劳。</p>
<p>岗位：研发与测试环境管理工程师<br />
人数：3人<br />
工作地点：杭州/上海<br />
岗位职责：<br />
1、   负责支付宝研发与测试环境建设、维护、支持和管理；<br />
2、   负责支付宝稳定测试环境的维护和联调支持工作。<br />
岗位要求：<br />
1、   本科以上学历，计算机或者相关专业，具有研发、测试相关经验者优先；<br />
2、   熟悉WEB相关技术，包括Apache，PHP，Jboss等应用的管理、配置；<br />
3、   了解Linux以及主要Unix网络服务，了解网络基本技术；<br />
4、   了解Java应用开发，了解Shell或Perl编程尤佳；<br />
5、   优秀的沟通能力，出色的学习与钻研能力，良好的问题分析与解决能力。</p>
<p>岗位：网站运行监控工程师<br />
人数：3人<br />
工作地点：杭州<br />
岗位职责：<br />
1、   负责支付宝网站业务和底层系统的运行健康状态监控，及时发现问题并有效协助处理；<br />
2、   负责支付宝网站运行事件记录、跟踪、总结，并出具准确的运行或故障报告；<br />
3、   对网站运行进行统计、分析，发现潜在的问题或趋势，并推动解决；<br />
4、   负责监控系统日常运行维护，完善运行监控体系。<br />
岗位要求：<br />
1、   计算机或电子商务相关专业，有网站监控、研发测试相关工作经验优先<br />
2、   熟悉Unix、Linux操作系统的使用，了解Apache、Jboss等Web应用服务器维护，了解脚本编写和开发；<br />
3、   具有良好的职业素养，工作认真、负责，团队合作意识强；<br />
4、   具有良好的学习能力和自我驱动能力；<br />
5、   能够吃苦耐劳，接受7×24的轮班值班。</p>
<p>岗位：应用运维工程师<br />
人数：3人<br />
工作地点：杭州/上海<br />
岗位职责：<br />
1、   支付宝网站应用的部署规划、实施、维护和优化；<br />
2、   参与支付宝网站应用产品研发，熟悉业务并给出稳定性要求和方案等；<br />
岗位要求：<br />
1、   本科以上学历，计算机或者相关专业，具有网站应用开发或维护经验者优先；<br />
2、   熟悉WEB相关技术，包括Apache，PHP，Jboss等应用的管理、配置和优化；<br />
3、   了解Linux以及主要Unix网络服务，了解网络基本技术；<br />
4、   熟悉Java应用开发，精通和灵活运用两种以上的脚本语言，包括：Shell、Perl等，尤佳；<br />
5、   优秀的沟通能力，出色的学习与钻研能力，良好的问题分析与解决能力。</p>
<p>岗位：技术服务台工程师<br />
人数：1人<br />
工作地点：杭州/上海<br />
岗位职责：<br />
1、   负责网站系统故障和问题的记录、跟踪、解决和关闭；<br />
2、   协调重大故障处理、分析和总结报告，跟踪、推进落实相应改善措施；<br />
3、   针对故障以及网站维护等重大事件进行业务影响分析，并进行影响预警或通告；<br />
4、   对故障和问题进行统计分析，提出改进方案和建议。<br />
岗位要求：<br />
1、   计算机或电子商务相关专业，有客户服务、技术支持相关工作经验优先<br />
2、   熟悉支付宝网站业务，具有一定的计算机系统运行基础知识；<br />
3、   具有良好的系统化思维，良好的问题分析与解决能力；<br />
4、   优秀的沟通和协调能力，行动以结果为导向，具有很好的客户服务意识；<br />
5、   具有良好的学习能力和自我驱动能力。。</p>
<p>岗位：行为审计专员<br />
人数：1人<br />
工作地点：杭州<br />
岗位职责：<br />
1、   对线上系统中关键操作日志进行监督检查和审计，且完成日常报表分析统计；<br />
2、   对权限进行规范化管理，且制定并更新运行管理人员操作风险控制策略；<br />
3、   对日常规章制度进行审核，对安全流程及策略进行优化；<br />
4、   协助主管完成其他内部控制工作。<br />
岗位要求：<br />
1、   思路清晰，具备敏锐的风险意识和良好的风险识别能力；<br />
2、   有强烈的责任心，工作积极主动，乐于从事日常事务性工作，<br />
3、   具备优秀的团队合作精神，良好的沟通、表达能力；<br />
4、   有独立判断问题能力，有较强的分析问题及提出解决建议方案的能力；<br />
5、   有客户服务经验者优先。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heysql.com/wordpress/other/alipay-job/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>两个泰瑞宝的设计-近期见闻</title>
		<link>http://www.heysql.com/wordpress/other/%e4%b8%a4%e4%b8%aa%e6%b3%b0%e7%91%9e%e5%ae%9d%e7%9a%84%e8%ae%be%e8%ae%a1-%e8%bf%91%e6%9c%9f%e8%a7%81%e9%97%bb/</link>
		<comments>http://www.heysql.com/wordpress/other/%e4%b8%a4%e4%b8%aa%e6%b3%b0%e7%91%9e%e5%ae%9d%e7%9a%84%e8%ae%be%e8%ae%a1-%e8%bf%91%e6%9c%9f%e8%a7%81%e9%97%bb/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 13:59:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[琐碎的其他]]></category>
		<category><![CDATA[don't make me think]]></category>
		<category><![CDATA[唠叨]]></category>
		<category><![CDATA[设计]]></category>

		<guid isPermaLink="false">http://www.heysql.com/wordpress/?p=149</guid>
		<description><![CDATA[  真的好久没有更新博客了，最近确实很忙，工作上啊，LP那边也有些事，闲暇之余多为休息，上推，话说我的follower好久没有波动了诶。以后希望博客中多一些生活的感悟，可能说得太夸张了，起码是生活上的一些东东吧。
  本来一直想写篇关于如何做PPT做分享的方法方式的文章，主要是听了很多，我总结了很多，想了很多，我觉得我总结提炼创新的一些东西还不错，希望以后自己或者团队或者需要的人能用得上，先delay吧，过段时间补上。
  先水一篇吧，最近看到了两个比较糟糕的设计，也许我很不专业，毕竟是外行，但是一个外行都觉得糟糕的设计是不是真的有问题呢？先看第一个：

本意是“公交服务热线”，但实际看起来像什么呢？当时是别人发现这个问题的，其实以前如果不说我也觉得没问题，因为潜意识会认为那个是“公”字，但是如果你不去加入你的想法呢，只是看着什么理解成什么呢？是不是就有问题了，起码我觉得好的设计是不需要用户去想的，don&#8217;t make me think!
然后是第二个:

这个图片没有旋转90度，先凑合着看下。这个还是LP和我说的，她说她不会对空调定时，因为找不到地方。确实，咋一看确实没有，但是我就说你就不能打开下面的这个盖子，滑动一下就能看到里面一堆的按钮了啊。但是她的一句“我以为是放电池的”让我突然发现了问题，是的，很多时候我们作为一部分用户想当然的问题在另外的用户群看来并不是这样的，像这里她说她以为是电池盒，不是每个人都会捣腾，打开看看，你可以说大家都知道电池在后盖等等，但是如果在下滑盖上加个标示或者箭头是不是更好呢，去引导用户，打开了自然知道是什么不是什么了，要把用户想得傻一点，去带领他们，也许产品会更好，而不是自己拍拍脑袋就设计。
  好吧，水到这里，时间还早，可以洗洗再学习学习充充电。
]]></description>
			<content:encoded><![CDATA[<p>  真的好久没有更新博客了，最近确实很忙，工作上啊，LP那边也有些事，闲暇之余多为休息，上推，话说我的follower好久没有波动了诶。以后希望博客中多一些生活的感悟，可能说得太夸张了，起码是生活上的一些东东吧。<br />
  本来一直想写篇关于如何做PPT做分享的方法方式的文章，主要是听了很多，我总结了很多，想了很多，我觉得我总结提炼创新的一些东西还不错，希望以后自己或者团队或者需要的人能用得上，先delay吧，过段时间补上。<br />
  先水一篇吧，最近看到了两个比较糟糕的设计，也许我很不专业，毕竟是外行，但是一个外行都觉得糟糕的设计是不是真的有问题呢？先看第一个：<br />
<img src="http://pic.yupoo.com/nosql/270249b1035e/6vhwxu6h.jpg" alt="一个广告" /><br />
本意是“公交服务热线”，但实际看起来像什么呢？当时是别人发现这个问题的，其实以前如果不说我也觉得没问题，因为潜意识会认为那个是“公”字，但是如果你不去加入你的想法呢，只是看着什么理解成什么呢？是不是就有问题了，起码我觉得好的设计是不需要用户去想的，don&#8217;t make me think!<br />
然后是第二个:<br />
<img src="http://pic.yupoo.com/nosql/246359b108bd/lj1n72m9.jpg" alt="遥控器" /><br />
这个图片没有旋转90度，先凑合着看下。这个还是LP和我说的，她说她不会对空调定时，因为找不到地方。确实，咋一看确实没有，但是我就说你就不能打开下面的这个盖子，滑动一下就能看到里面一堆的按钮了啊。但是她的一句“我以为是放电池的”让我突然发现了问题，是的，很多时候我们作为一部分用户想当然的问题在另外的用户群看来并不是这样的，像这里她说她以为是电池盒，不是每个人都会捣腾，打开看看，你可以说大家都知道电池在后盖等等，但是如果在下滑盖上加个标示或者箭头是不是更好呢，去引导用户，打开了自然知道是什么不是什么了，要把用户想得傻一点，去带领他们，也许产品会更好，而不是自己拍拍脑袋就设计。<br />
  好吧，水到这里，时间还早，可以洗洗再学习学习充充电。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heysql.com/wordpress/other/%e4%b8%a4%e4%b8%aa%e6%b3%b0%e7%91%9e%e5%ae%9d%e7%9a%84%e8%ae%be%e8%ae%a1-%e8%bf%91%e6%9c%9f%e8%a7%81%e9%97%bb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>my first wishlist</title>
		<link>http://www.heysql.com/wordpress/other/my-first-wishlist/</link>
		<comments>http://www.heysql.com/wordpress/other/my-first-wishlist/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 12:00:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[琐碎的其他]]></category>
		<category><![CDATA[wish]]></category>

		<guid isPermaLink="false">http://www.heysql.com/wordpress/other/my-first-wishlist/</guid>
		<description><![CDATA[未来一年的wishlist:
1.发挥本职工作的最大价值，更好的融入团队。
2.协助jocelyn童鞋找到适合自己的事情。
3.多交一些其他领域的朋友。
4.htc g2 and iphone 4
5.看三本以上的技术类书籍。
6.完善自己获取知识的渠道。
]]></description>
			<content:encoded><![CDATA[<p>未来一年的wishlist:<br />
1.发挥本职工作的最大价值，更好的融入团队。<br />
2.协助jocelyn童鞋找到适合自己的事情。<br />
3.多交一些其他领域的朋友。<br />
4.htc g2 and iphone 4<br />
5.看三本以上的技术类书籍。<br />
6.完善自己获取知识的渠道。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heysql.com/wordpress/other/my-first-wishlist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>optimizer_search_depth</title>
		<link>http://www.heysql.com/wordpress/mysql/optimizer_search_depth/</link>
		<comments>http://www.heysql.com/wordpress/mysql/optimizer_search_depth/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 07:48:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[optimizer_search_depth]]></category>

		<guid isPermaLink="false">http://www.heysql.com/other/optimizer_search_depth/</guid>
		<description><![CDATA[optimizer_search_depth
The maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to generate an execution plan for a query. Values smaller than the number of relations in a query return an execution plan quicker, but the resulting plan [...]]]></description>
			<content:encoded><![CDATA[<p>optimizer_search_depth<br />
The maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to generate an execution plan for a query. Values smaller than the number of relations in a query return an execution plan quicker, but the resulting plan may be far from being optimal.<br />
其中的the number of relations in a query到底指什么？Mark一下</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heysql.com/wordpress/mysql/optimizer_search_depth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL的Clustered Table？</title>
		<link>http://www.heysql.com/wordpress/mysql/mysql%e7%9a%84clustered-table%ef%bc%9f/</link>
		<comments>http://www.heysql.com/wordpress/mysql/mysql%e7%9a%84clustered-table%ef%bc%9f/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 06:01:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Clustered Table]]></category>

		<guid isPermaLink="false">http://www.heysql.com/?p=73</guid>
		<description><![CDATA[http://www.yupoo.com/photos/nosql/73299304/
Mark一下。
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.yupoo.com/photos/nosql/73299304/ ">http://www.yupoo.com/photos/nosql/73299304/</a></p>
<p>Mark一下。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heysql.com/wordpress/mysql/mysql%e7%9a%84clustered-table%ef%bc%9f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Midpoint Insertion Strategy的翻译和理解</title>
		<link>http://www.heysql.com/wordpress/mysql/midpoint-insertion-strategy%e7%9a%84%e7%bf%bb%e8%af%91%e5%92%8c%e7%90%86%e8%a7%a3/</link>
		<comments>http://www.heysql.com/wordpress/mysql/midpoint-insertion-strategy%e7%9a%84%e7%bf%bb%e8%af%91%e5%92%8c%e7%90%86%e8%a7%a3/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 10:20:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[hot子链]]></category>
		<category><![CDATA[LRU]]></category>
		<category><![CDATA[Midpoint Insertion Strategy]]></category>
		<category><![CDATA[warm子链]]></category>

		<guid isPermaLink="false">http://www.heysql.com/mysql/midpoint-insertion-strategy%e7%9a%84%e7%bf%bb%e8%af%91%e5%92%8c%e7%90%86%e8%a7%a3/</guid>
		<description><![CDATA[7.4.5.3.&#160;Midpoint Insertion Strategy
By default, the key cache management system uses a simple LRU strategy for choosing key cache blocks to be evicted, but it also supports a more sophisticated method called the midpoint insertion strategy. 
Key Cache管理系统默认使用LRU策略来选择丢弃的block，它同样支持一种更复杂的方法：midpoint insertion strategy。
When using the midpoint insertion strategy, the LRU chain is divided into two parts: a hot sublist [...]]]></description>
			<content:encoded><![CDATA[<h4 style="margin: 12pt 0in 3pt"><font size="5" face="Calibri">7.4.5.3.&nbsp;Midpoint Insertion Strategy</font></h4>
<p><font face="Times New Roman"><font size="3">By default, the key cache management system uses a simple LRU strategy for choosing key cache blocks to be evicted, but it also supports a more sophisticated method called the <em>midpoint insertion strategy.</em> <span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><o:p></o:p></span></font></font></p>
<p><font size="3"><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">Key Cache</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">管理系统默认使用</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">LRU</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">策略来选择丢弃的</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">block</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">，它同样支持一种更复杂的方法：</span><em><font face="Times New Roman">midpoint insertion strategy</font></em><em><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">。</span></em><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><o:p></o:p></span></font></p>
<p><font size="3" face="Times New Roman">When using the midpoint insertion strategy, the LRU chain is divided into two parts: a hot sublist and a warm sublist. The division point between two parts is not fixed, but the key cache management system takes care that the warm part is not &ldquo;<span class="quote">too short,</span>&rdquo; always containing at least </font><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_key_cache_division_limit"><code><span style="color: blue; font-size: 10pt; text-decoration: none; text-underline: none">key_cache_division_limit</span></code></a><font size="3" face="Times New Roman"> percent of the key cache blocks. </font><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_key_cache_division_limit"><code><span style="color: blue; font-size: 10pt; text-decoration: none; text-underline: none">key_cache_division_limit</span></code></a><font face="Times New Roman"><font size="3"> is a component of structured key cache variables, so its value is a parameter that can be set per cache. <span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><o:p></o:p></span></font></font></p>
<p><font size="3"><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">当使用</span><em><font face="Times New Roman">midpoint insertion strategy</font></em><em><span style="font-style: normal; font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-bidi-font-style: italic" lang="ZH-CN">策略时，</span></em><em><span style="font-style: normal; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-bidi-font-style: italic"><font face="Times New Roman">LRU</font></span></em><em><span style="font-style: normal; font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-bidi-font-style: italic" lang="ZH-CN">的链被分成两部分：</span></em><em><span style="font-style: normal; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-bidi-font-style: italic"><font face="Times New Roman">hot</font></span></em><em><span style="font-style: normal; font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-bidi-font-style: italic" lang="ZH-CN">子链和</span></em><em><span style="font-style: normal; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-bidi-font-style: italic"><font face="Times New Roman">warm</font></span></em><em><span style="font-style: normal; font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-bidi-font-style: italic" lang="ZH-CN">子链。分割点不是固定的，但是</span></em><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">Key Cache</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">管理系统控制着</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">warm</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">子链，不会让它过于短，至少是</span></font><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_key_cache_division_limit"><code><span style="color: blue; font-size: 10pt; text-decoration: none; text-underline: none">key_cache_division_limit</span></code></a><font size="3"><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">的百分比于</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">Key Cache</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">的长度。</span></font><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_key_cache_division_limit"><code><span style="color: blue; font-size: 10pt; text-decoration: none; text-underline: none">key_cache_division_limit</span></code></a><font size="3"><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">是</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">Key Cache</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">的系统变量，所以它可以为每个</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">Cache</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">设置。</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><o:p></o:p></span></font></p>
<p><font face="Times New Roman"><font size="3">When an index block is read from a table into the key cache, it is placed at the end of the warm sublist. After a certain number of hits (accesses of the block), it is promoted to the hot sublist. At present, the number of hits required to promote a block (3) is the same for all index blocks. <span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><o:p></o:p></span></font></font></p>
<p><font size="3"><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">当一个索引块被从表中读取到</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">Key Cache</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">中时，它被放在</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">warm</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">子链的<span style="color: red">尾部</span>。在一定数量的访问</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">(</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">点击</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">)</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">后，</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">(</font></span><span style="font-family: 宋体; color: red; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">其实在这之前该</span><span style="color: red; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">block</font></span><span style="font-family: 宋体; color: red; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">已经在</span><span style="color: red; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">warm</font></span><span style="font-family: 宋体; color: red; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">子链的开始部分了</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">)</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">它被提升到</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">hot</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">子链中。在目前来说，对该</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">block</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">的访问次数是所有的</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">index blocks</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">的总和</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">(</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">数字的等同</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">)</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">。</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><o:p></o:p></span></font></p>
<p><font size="3" face="Times New Roman">A block promoted into the hot sublist is placed at the end of the list. The block then circulates within this sublist. If the block stays at the beginning of the sublist for a long enough time, it is demoted to the warm sublist. This time is determined by the value of the </font><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_key_cache_age_threshold"><code><span style="color: blue; font-size: 10pt; text-decoration: none; text-underline: none">key_cache_age_threshold</span></code></a><font face="Times New Roman"><font size="3"> component of the key cache.<span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><o:p></o:p></span></font></font></p>
<p><font size="3"><span style="mso-spacerun: yes"><font face="Times New Roman">&nbsp;</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">当一个</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">block</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">被提升到</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">hot</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">子链时，它是放在</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">hot</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">子链的<span style="color: red">尾部</span>。然后该</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">block</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">开始在</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">hot</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">子链中循环。如果该</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">block</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">在</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">hot</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">子链的开始部分待了很长时间，它会被降到</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">warm</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">子链。这次决定的是</span></font><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_key_cache_age_threshold"><code><span style="color: blue; font-size: 10pt; text-decoration: none; text-underline: none">key_cache_age_threshold</span></code></a><font size="3"><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">系统变量。</span></font></p>
<p><font size="3"><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><o:p></o:p></span></font>&nbsp;<img class="" alt="" src="http://pic.yupoo.com/nosql/4793891fd1f7/t4rqlh6b.jpg" /></p>
<p><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><o:p></o:p></span></p>
<p><font size="3" face="Times New Roman">The threshold value prescribes that, for a key cache containing </font><code><em><span style="font-size: 10pt">N</span></em></code><font size="3" face="Times New Roman"> blocks, the block at the beginning of the hot sublist not accessed within the last </font><code><em><span style="font-size: 10pt">N</span></em></code><code><span style="font-size: 10pt"> &times; key_cache_age_threshold / 100</span></code><font face="Times New Roman"><font size="3"> hits is to be moved to the beginning of the warm sublist. It then becomes the first candidate for eviction, because blocks for replacement always are taken from the beginning of the warm sublist. <span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><o:p></o:p></span></font></font></p>
<p><font size="3"><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">假定</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">Key Cache</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">中有</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">N</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">个</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">blocks</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">，临界值规定了：在</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">hot</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">子链开始部分的</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">block</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">在最近的</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">(</font></span></font><code><em><span style="font-size: 10pt">N</span></em></code><code><span style="font-size: 10pt"> &times; <span style="color: red">key_cache_age_threshold</span> / 100</span></code><font size="3"><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">)</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">次访问中没有涉及的话被放回</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">warm</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">子链的开始部分。</span></font><code><span style="color: red; font-size: 10pt">key_cache_age_threshold</span></code><code><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">决定了频率的高低</span></code><code><span style="color: red; font-size: 10pt; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast">(</span></code><code><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">最小值</span></code><code><span style="color: red; font-size: 10pt; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast">100)</span></code><code><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">。</span></code><code><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">然后该</span></code><code><span style="font-size: 10pt; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast">block</span></code><code><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">成为最有可能被丢弃的，因为新的</span></code><code><span style="font-size: 10pt; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast">block</span></code><code><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">替换就发生在</span></code><code><span style="font-size: 10pt; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast">warm</span></code><code><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">子链的开始部分。</span></code><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><o:p></o:p></span></p>
<p><font size="3" face="Times New Roman">The midpoint insertion strategy allows you to keep more-valued blocks always in the cache. If you prefer to use the plain LRU strategy, leave the </font><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_key_cache_division_limit"><code><span style="color: blue; font-size: 10pt; text-decoration: none; text-underline: none">key_cache_division_limit</span></code></a><font face="Times New Roman"><font size="3"> value set to its default of 100. <span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><o:p></o:p></span></font></font></p>
<p><font size="3"><font face="Times New Roman">midpoint insertion strategy</font><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">能让你保持重要的</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">block</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">始终在</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">Cache</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">中</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">(</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">设置</span></font><code><span style="color: red; font-size: 10pt">key_cache_age_threshold</span></code><code><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">即可</span></code><font size="3"><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">)</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">。如果你还是想使用</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">LRU</font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">策略，那么将</span></font><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_key_cache_division_limit"><code><span style="color: blue; font-size: 10pt; text-decoration: none; text-underline: none">key_cache_division_limit</span></code></a><font size="3"><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast" lang="ZH-CN">设置成默认的</span><span style="mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast"><font face="Times New Roman">100<o:p></o:p></font></span></font></p>
<p><font size="3" face="Times New Roman">The midpoint insertion strategy helps to improve performance when execution of a query that requires an index scan effectively pushes out of the cache all the index blocks corresponding to valuable high-level B-tree nodes. To avoid this, you must use a midpoint insertion strategy with the </font><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_key_cache_division_limit"><code><span style="color: blue; font-size: 10pt; text-decoration: none; text-underline: none">key_cache_division_limit</span></code></a><font size="3" face="Times New Roman"> set to much less than 100. Then valuable frequently hit nodes are preserved in the hot sublist during an index scan operation as well. </font></p>
<p style="line-height: 12pt; margin: 0in 0in 10pt; background: white" class="MsoNormal"><font size="3"><font face="Calibri">midpoint insertion strategy</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">帮助你提升执行全索引扫描时几乎所有的</span><font face="Calibri">Cache(<span style="color: red">warm</span></font><span style="font-family: 宋体; color: red; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">子链的部分</span><font face="Calibri">)</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">都要替换成新的</span><font face="Calibri">B</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">树节点的性能。为了避免对性能产生较大的影响，你必须将</span></font><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_key_cache_division_limit"><code><span style="color: blue; font-size: 10pt; text-decoration: none; mso-fareast-font-family: 宋体; text-underline: none">key_cache_division_limit</span></code></a><font size="3"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">设置成小于</span><font face="Calibri">100(</font><span style="font-family: 宋体; color: red; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">有效地控制其影响范围</span><font face="Calibri">)</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">。这样重要的经常访问的节点在全索引扫描时就被保护在</span><font face="Calibri">hot</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">子链中。</span></font></p>
<p style="line-height: 12pt; margin: 0in 0in 10pt; background: white" class="MsoNormal"><font size="3"><span style="font-family: 宋体; color: red; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">总结：相当于在一个</span><span style="color: red"><font face="Calibri">LRU</font></span><span style="font-family: 宋体; color: red; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">链上虚拟了两个链</span><span style="color: red"><font face="Calibri">(hot</font></span><span style="font-family: 宋体; color: red; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">和</span><span style="color: red"><font face="Calibri">warm)</font></span><span style="font-family: 宋体; color: red; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">，全索引扫描时不会波及全部。</span></font><span style="color: red"><o:p></o:p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.heysql.com/wordpress/mysql/midpoint-insertion-strategy%e7%9a%84%e7%bf%bb%e8%af%91%e5%92%8c%e7%90%86%e8%a7%a3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Refman 7.4.5 The MyISAM Key Cache 译文</title>
		<link>http://www.heysql.com/wordpress/mysql/mysql-refman-7-4-5-the-myisam-key-cache-%e8%af%91%e6%96%87/</link>
		<comments>http://www.heysql.com/wordpress/mysql/mysql-refman-7-4-5-the-myisam-key-cache-%e8%af%91%e6%96%87/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 07:52:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[MyISAM Key Cach]]></category>

		<guid isPermaLink="false">http://www.heysql.com/mysql/mysql-refman-7-4-5-the-myisam-key-cache-%e8%af%91%e6%96%87/</guid>
		<description><![CDATA[原文：



7.4.5.&#160;The MyISAM Key Cache




[+/-]

7.4.5.1. Shared Key Cache Access
7.4.5.2. Multiple Key Caches
7.4.5.3. Midpoint Insertion Strategy
7.4.5.4. Index Preloading
7.4.5.5. Key Cache Block Size
7.4.5.6. Restructuring a Key Cache



To minimize disk I/O, the MyISAM storage engine exploits a strategy that is used by many database management systems. It employs a cache mechanism to keep the most frequently accessed table blocks [...]]]></description>
			<content:encoded><![CDATA[<p><font color="#ff0000">原文：</font></p>
<div class="titlepage">
<div>
<div>
<h3 class="title">7.4.5.&nbsp;The <code class="literal">MyISAM</code> Key Cache</h3>
</div>
</div>
</div>
<div class="toc">
<p><small><font size="2">[</font><a class="tocdetail" onkeypress="if<br />
(event.keyCode == 13) { toggle('tocdetail-0');}" onclick="toggle('tocdetail-0');" href="http://dev.mysql.com/doc/refman/5.1/en/myisam-key-cache.html#nolinkhere"><font size="2">+/-</font></a><font size="2">]</font></small></p>
<dl id="tocdetail-0">
<dt><span class="section"><a href="http://dev.mysql.com/doc/refman/5.1/en/shared-key-cache.html">7.4.5.1. Shared Key Cache Access</a></span></dt>
<dt><span class="section"><a href="http://dev.mysql.com/doc/refman/5.1/en/multiple-key-caches.html">7.4.5.2. Multiple Key Caches</a></span></dt>
<dt><span class="section"><a href="http://dev.mysql.com/doc/refman/5.1/en/midpoint-insertion.html">7.4.5.3. Midpoint Insertion Strategy</a></span></dt>
<dt><span class="section"><a href="http://dev.mysql.com/doc/refman/5.1/en/index-preloading.html">7.4.5.4. Index Preloading</a></span></dt>
<dt><span class="section"><a href="http://dev.mysql.com/doc/refman/5.1/en/key-cache-block-size.html">7.4.5.5. Key Cache Block Size</a></span></dt>
<dt><span class="section"><a href="http://dev.mysql.com/doc/refman/5.1/en/key-cache-restructuring.html">7.4.5.6. Restructuring a Key Cache</a></span></dt>
</dl>
</div>
<p><a class="indexterm" name="id2906164"></a><a class="indexterm" name="id2906173"></a></p>
<p>To minimize disk I/O, the <code class="literal">MyISAM</code> storage engine exploits a strategy that is used by many database management systems. It employs a cache mechanism to keep the most frequently accessed table blocks in memory:</p>
<div class="itemizedlist">
<ul>
<li>
<p>For index blocks, a special structure called the <em class="firstterm">key cache</em> (or <em class="firstterm">key buffer</em>) is maintained. The structure contains a number of block buffers where the most-used index blocks are placed.</p>
</li>
<li>
<p>For data blocks, MySQL uses no special cache. Instead it relies on the native operating system file system cache.</p>
</li>
</ul>
</div>
<p>This section first describes the basic operation of the <code class="literal">MyISAM</code> key cache. Then it discusses features that improve key cache performance and that enable you to better control cache operation:</p>
<div class="itemizedlist">
<ul>
<li>
<p>Multiple sessions can access the cache concurrently.</p>
</li>
<li>
<p>You can set up multiple key caches and assign table indexes to specific caches.</p>
</li>
</ul>
</div>
<p>To control the size of the key cache, use the <a href="http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_key_buffer_size"><code class="literal">key_buffer_size</code></a> system variable. If this variable is set equal to zero, no key cache is used. The key cache also is not used if the <a href="http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_key_buffer_size"><code class="literal">key_buffer_size</code></a> value is too small to allocate the minimal number of block buffers (8).</p>
<p class="mnmas"><strong>MySQL Enterprise.&nbsp;</strong> For expert advice on identifying the optimum size for <a href="http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_key_buffer_size"><code class="literal">key_buffer_size</code></a>, subscribe to the MySQL Enterprise Monitor. See http://www.mysql.com/products/enterprise/advisors.html.</p>
<p>When the key cache is not operational, index files are accessed using only the native file system buffering provided by the operating system. (In other words, table index blocks are accessed using the same strategy as that employed for table data blocks.)</p>
<p>An index block is a contiguous unit of access to the <code class="literal">MyISAM</code> index files. Usually the size of an index block is equal to the size of nodes of the index B-tree. (Indexes are represented on disk using a B-tree data structure. Nodes at the bottom of the tree are leaf nodes. Nodes above the leaf nodes are nonleaf nodes.)</p>
<p>All block buffers in a key cache structure are the same size. This size can be equal to, greater than, or less than the size of a table index block. Usually one these two values is a multiple of the other.</p>
<p>When data from any table index block must be accessed, the server first checks whether it is available in some block buffer of the key cache. If it is, the server accesses data in the key cache rather than on disk. That is, it reads from the cache or writes into it rather than reading from or writing to disk. Otherwise, the server chooses a cache block buffer containing a different table index block (or blocks) and replaces the data there by a copy of required table index block. As soon as the new index block is in the cache, the index data can be accessed.</p>
<p>If it happens that a block selected for replacement has been modified, the block is considered &ldquo;<span class="quote">dirty.</span>&rdquo; In this case, prior to being replaced, its contents are flushed to the table index from which it came.</p>
<p>Usually the server follows an <em class="firstterm">LRU (Least Recently Used)</em> strategy: When choosing a block for replacement, it selects the least recently used index block. To make this choice easier, the key cache module maintains all used blocks in a special list (<em class="firstterm">LRU chain</em>) ordered by time of use. When a block is accessed, it is the most recently used and is placed at the end of the list. When blocks need to be replaced, blocks at the beginning of the list are the least recently used and become the first candidates for eviction.</p>
<p style="line-height: 12pt; margin: 0in 0in 10pt; background: white" class="MsoNormal"><font color="#0000ff" size="2"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">译文：</span></font></p>
<p style="line-height: 12pt; margin: 0in 0in 10pt; background: white" class="MsoNormal"><font size="2"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">为了减小</span><font face="Calibri">disk</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">的</span><font face="Calibri">I/O</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">，</span><font face="Calibri">MyISAM</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">的存储引擎和一般的数据库系统一样，使用了缓存机制保存经常访问的</span><font face="Calibri">block(index block)</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">。</span></font></p>
<ul style="margin-top: 0in" type="disc">
<li style="line-height: 12pt; margin: 0in 0in 10pt; background: white; mso-list: l1 level1 lfo1" class="MsoNormal"><font size="2"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">对于索引块</span><font face="Calibri">(index block)</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">，</span><font face="Calibri">Key Cache</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">中保存了常用的索引块。</span></font></li>
<li style="line-height: 12pt; margin: 0in 0in 10pt; background: white; mso-list: l1 level1 lfo1" class="MsoNormal"><font size="2"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">对于数据块</span><font face="Calibri">(data block)</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">，</span><font face="Calibri">MySQL</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">没有使用</span><font face="Calibri">Cache</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">，只是使用了操作系统中文件系统本身的</span><font face="Calibri">Cache</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">。</span></font></li>
</ul>
<p style="line-height: 12pt; margin: 0in 0in 10pt; background: white" class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN"><font size="2">基本的功能机制和性能优化选项。</font></span></p>
<ul style="margin-top: 0in" type="disc">
<li style="line-height: 12pt; margin: 0in 0in 10pt; background: white; mso-list: l0 level1 lfo2" class="MsoNormal"><font size="2"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">多</span><font face="Calibri">session</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">并发访问</span><font face="Calibri">Cache</font></font></li>
<li style="line-height: 12pt; margin: 0in 0in 10pt; background: white; mso-list: l0 level1 lfo2" class="MsoNormal"><font size="2"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">可以</span><font face="Calibri">set up</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">多重</span><font face="Calibri">Key Cache</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">，并指定一个</span><font face="Calibri">table index</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">给指定的</span><font face="Calibri">Cache</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">。</span></font></li>
</ul>
<p style="line-height: 12pt; margin: 0in 0in 10pt; background: white" class="MsoNormal"><font size="2"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">参数</span><font face="Calibri">key_buffer_size</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">设置为</span><font face="Calibri">0</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">或者过小时不使用</span><font face="Calibri">Key Cache</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">，也就是和数据块一样只能使用操作系统中文件系统自带的</span><font face="Calibri">Cache</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">。</span></font></p>
<p style="line-height: 12pt; margin: 0in 0in 10pt; background: white" class="MsoNormal"><font size="2"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">一个索引块一般是</span><font face="Calibri">MyISAM</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">的索引文件的连续访问的组合。一般索引块的大小是</span><font face="Calibri">MyISAM</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">的索引结构中节点的大小</span><font face="Calibri">(MyISAM</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">的索引以</span><font face="Calibri">BTREE</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">结构存放</span><font face="Calibri">)</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">。</span></font></p>
<p style="line-height: 12pt; margin: 0in 0in 10pt; background: white" class="MsoNormal"><font size="2"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">所有</span><font face="Calibri">Key Cache</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">中的</span><font face="Calibri">block buffer</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">是一样大的，可以大于、等于、小于索引块的大小。</span></font></p>
<p style="line-height: 12pt; margin: 0in 0in 10pt; background: white" class="MsoNormal"><font size="2"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">当需要访问索引数据时，服务器检查是否有现成的</span><font face="Calibri">block buffer</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">在</span><font face="Calibri">Key Cache</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">中。若有，则从</span><font face="Calibri">Key Cache</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">中读取而不是</span><font face="Calibri">disk</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">上读取。也就是说，对索引的读和写均在</span><font face="Calibri">Key Cache</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">上</span><font face="Calibri">(</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">写的部分到时候要</span><font face="Calibri">flush</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">到</span><font face="Calibri">disk</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">上</span><font face="Calibri">)</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">。若没有，服务器将</span><font face="Calibri">Cache</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">中包含的不同表的索引块的</span><font face="Calibri">block buffer</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">替换成请求的索引块的拷贝，然后再提供读写。</span></font></p>
<p style="line-height: 12pt; margin: 0in 0in 10pt; background: white" class="MsoNormal"><font size="2"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">当一个</span><font face="Calibri">block</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">被替换之前已经被修改过了，这个</span><font face="Calibri">block</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">就被标记为</span><font face="Calibri">&rdquo;</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">脏</span><font face="Calibri">&rdquo;</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">。这种情况下，在再次替换前，先将这个</span><font face="Calibri">block flush</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">到所属表的</span><font face="Calibri">index</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">文件上</span><font face="Calibri">(</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">在</span><font face="Calibri">disk</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">上</span><font face="Calibri">)</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">。</span></font></p>
<p style="line-height: 12pt; margin: 0in 0in 10pt; background: white" class="MsoNormal"><font size="2"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">服务器一般使用</span><font face="Calibri">LRU</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">策略：当选择被替换的</span><font face="Calibri">block</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">时，选择最近最少使用的索引块。为了更好地实现该算法，</span><font face="Calibri">Key Cache</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">模块将所有的</span><font face="Calibri">block</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">按时间顺序放在一个</span><font face="Calibri">list</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">中</span><font face="Calibri">(LRU</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">链</span><font face="Calibri">)</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">，当一个</span><font face="Calibri">block</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">被访问时，它被放在最近最常使用的位置</span><font face="Calibri">(</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">即</span><font face="Calibri">LRU</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">链的结尾，</span><font face="Calibri">MRU</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">端</span><font face="Calibri">)</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">。当一个</span><font face="Calibri">block</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">需要被替换时，</span><font face="Calibri">LRU</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">的开头部分</span><font face="Calibri">(LRU</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">端</span><font face="Calibri">)</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">就是优先考虑的部分，没有再到</span><font face="Calibri">MRU</font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">部分找。</span></font></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heysql.com/wordpress/mysql/mysql-refman-7-4-5-the-myisam-key-cache-%e8%af%91%e6%96%87/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CAP原理与最终一致性(转载)</title>
		<link>http://www.heysql.com/wordpress/mysql/cap%e5%8e%9f%e7%90%86%e4%b8%8e%e6%9c%80%e7%bb%88%e4%b8%80%e8%87%b4%e6%80%a7%e8%bd%ac%e8%bd%bd/</link>
		<comments>http://www.heysql.com/wordpress/mysql/cap%e5%8e%9f%e7%90%86%e4%b8%8e%e6%9c%80%e7%bb%88%e4%b8%80%e8%87%b4%e6%80%a7%e8%bd%ac%e8%bd%bd/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 09:03:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[CAP]]></category>
		<category><![CDATA[eventually consistent]]></category>
		<category><![CDATA[最终一致性]]></category>

		<guid isPermaLink="false">http://www.heysql.com/mysql/cap%e5%8e%9f%e7%90%86%e4%b8%8e%e6%9c%80%e7%bb%88%e4%b8%80%e8%87%b4%e6%80%a7%e8%bd%ac%e8%bd%bd/</guid>
		<description><![CDATA[Ningoo的一篇博文，写得很好，转载一下。
原文：http://www.ningoo.net/html/2010/cap_theorem_and_eventually_consistent.html
CAP原理(CAP Theorem)
在足球比赛里，一个球员在一场比赛中进三个球，称之为帽子戏法(Hat-trick)。在分布式数据系统中，也有一个帽子原理(CAP Theorem)，不过此帽子非彼帽子。CAP原理中，有三个要素：

一致性(Consistency)
可用性(Availability)
分区容忍性(Partition tolerance)

CAP原理指的是，这三个要素最多只能同时实现两点，不可能三者兼顾。因此在进行分布式架构设计时，必须做出取舍。而对于分布式数据系统，分区容忍性是基本要求，否则就失去了价值。因此设计分布式数据系统，就是在一致性和可用性之间取一个平衡。对于大多数web应用，其实并不需要强一致性，因此牺牲一致性而换取高可用性，是目前多数分布式数据库产品的方向。
当然，牺牲一致性，并不是完全不管数据的一致性，否则数据是混乱的，那么系统可用性再高分布式再好也没有了价值。牺牲一致性，只是不再要求关系型数据库中的强一致性，而是只要系统能达到最终一致性即可，考虑到客户体验，这个最终一致的时间窗口，要尽可能的对用户透明，也就是需要保障&#8220;用户感知到的一致性&#8221;。通常是通过数据的多份异步复制来实现系统的高可用和数据的最终一致性的，&#8220;用户感知到的一致性&#8221;的时间窗口则取决于数据复制到一致状态的时间。
最终一致性(eventually consistent)
对于一致性，可以分为从客户端和服务端两个不同的视角。从客户端来看，一致性主要指的是多并发访问时更新过的数据如何获取的问题。从服务端来看，则是更新如何复制分布到整个系统，以保证数据最终一致。一致性是因为有并发读写才有的问题，因此在理解一致性的问题时，一定要注意结合考虑并发读写的场景。
从客户端角度，多进程并发访问时，更新过的数据在不同进程如何获取的不同策略，决定了不同的一致性。对于关系型数据库，要求更新过的数据能被后续的访问都能看到，这是强一致性。如果能容忍后续的部分或者全部访问不到，则是弱一致性。如果经过一段时间后要求能访问到更新后的数据，则是最终一致性。
最终一致性根据更新数据后各进程访问到数据的时间和方式的不同，又可以区分为：


因果一致性。如果进程A通知进程B它已更新了一个数据项，那么进程B的后续访问将返回更新后的值，且一次写入将保证取代前一次写入。与进程A无因果关系的进程C的访问遵守一般的最终一致性规则。
&#8220;读己之所写（read-your-writes）&#8221;一致性。当进程A自己更新一个数据项之后，它总是访问到更新过的值，绝不会看到旧值。这是因果一致性模型的一个特例。
会话（Session）一致性。这是上一个模型的实用版本，它把访问存储系统的进程放到会话的上下文中。只要会话还存在，系统就保证&#8220;读己之所写&#8221;一致性。如果由于某些失败情形令会话终止，就要建立新的会话，而且系统的保证不会延续到新的会话。
单调（Monotonic）读一致性。如果进程已经看到过数据对象的某个值，那么任何后续访问都不会返回在那个值之前的值。
单调写一致性。系统保证来自同一个进程的写操作顺序执行。要是系统不能保证这种程度的一致性，就非常难以编程了。


上述最终一致性的不同方式可以进行组合，例如单调读一致性和读己之所写一致性就可以组合实现。并且从实践的角度来看，这两者的组合，读取自己更新的数据，和一旦读取到最新的版本不会再读取旧版本，对于此架构上的程序开发来说，会少很多额外的烦恼。
从服务端角度，如何尽快将更新后的数据分布到整个系统，降低达到最终一致性的时间窗口，是提高系统的可用度和用户体验非常重要的方面。对于分布式数据系统：

N &#8212; 数据复制的份数
W &#8212; 更新数据是需要保证写完成的节点数
R &#8212; 读取数据的时候需要读取的节点数

如果W+R&#62;N，写的节点和读的节点重叠，则是强一致性。例如对于典型的一主一备同步复制的关系型数据库，N=2,W=2,R=1，则不管读的是主库还是备库的数据，都是一致的。
如果W+R&#60;=N，则是弱一致性。例如对于一主一备异步复制的关系型数据库，N=2,W=1,R=1，则如果读的是备库，就可能无法读取主库已经更新过的数据，所以是弱一致性。
对于分布式系统，为了保证高可用性，一般设置N&#62;=3。不同的N,W,R组合，是在可用性和一致性之间取一个平衡，以适应不同的应用场景。

如果N=W,R=1，任何一个写节点失效，都会导致写失败，因此可用性会降低，但是由于数据分布的N个节点是同步写入的，因此可以保证强一致性。
如果N=R,W=1，只需要一个节点写入成功即可，写性能和可用性都比较高。但是读取其他节点的进程可能不能获取更新后的数据，因此是弱一致性。这种情况下，如果W&#60;(N+1)/2，并且写入的节点不重叠的话，则会存在写冲突

]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ningoo.net/">Ningoo</a>的一篇博文，写得很好，转载一下。</p>
<p>原文：<a href="http://www.ningoo.net/html/2010/cap_theorem_and_eventually_consistent.html">http://www.ningoo.net/html/2010/cap_theorem_and_eventually_consistent.html</a></p>
<p><strong>CAP原理(CAP Theorem)</strong></p>
<p>在足球比赛里，一个球员在一场比赛中进三个球，称之为帽子戏法(Hat-trick)。在分布式数据系统中，也有一个帽子原理(CAP Theorem)，不过此帽子非彼帽子。CAP原理中，有三个要素：</p>
<ul>
<li>一致性(<strong>C</strong>onsistency)</li>
<li>可用性(<strong>A</strong>vailability)</li>
<li>分区容忍性(<strong>P</strong>artition tolerance)</li>
</ul>
<p>CAP原理指的是，这三个要素最多只能同时实现两点，不可能三者兼顾。因此在进行分布式架构设计时，必须做出取舍。而<strong>对于分布式数据系统，分区容忍性是基本要求</strong>，否则就失去了价值。因此设计分布式数据系统，就是在一致性和可用性之间取一个平衡。对于大多数web应用，其实并不需要强一致性，因此牺牲一致性而换取高可用性，是目前多数分布式数据库产品的方向。</p>
<p>当然，牺牲一致性，并不是完全不管数据的一致性，否则数据是混乱的，那么系统可用性再高分布式再好也没有了价值。牺牲一致性，只是不再要求关系型数据库中的强一致性，而是只要系统能达到<strong>最终一致性</strong>即可，考虑到客户体验，这个最终一致的时间窗口，要尽可能的对用户透明，也就是需要保障&ldquo;用户感知到的一致性&rdquo;。通常是通过数据的多份异步复制来实现系统的高可用和数据的最终一致性的，&ldquo;用户感知到的一致性&rdquo;的时间窗口则取决于数据复制到一致状态的时间。</p>
<p><strong>最终一致性(eventually consistent)</strong></p>
<p>对于一致性，可以分为从客户端和服务端两个不同的视角。从客户端来看，一致性主要指的是多并发访问时更新过的数据如何获取的问题。从服务端来看，则是更新如何复制分布到整个系统，以保证数据最终一致。一致性是因为有并发读写才有的问题，因此在理解一致性的问题时，一定要注意结合考虑并发读写的场景。</p>
<p>从客户端角度，多进程并发访问时，更新过的数据在不同进程如何获取的不同策略，决定了不同的一致性。对于关系型数据库，要求更新过的数据能被后续的访问都能看到，这是<strong>强一致性</strong>。如果能容忍后续的部分或者全部访问不到，则是<strong>弱一致性</strong>。如果经过一段时间后要求能访问到更新后的数据，则是最终一致性。</p>
<p>最终一致性根据更新数据后各进程访问到数据的时间和方式的不同，又可以区分为：</p>
<blockquote>
<ul>
<li><strong>因果一致性</strong>。如果进程A通知进程B它已更新了一个数据项，那么进程B的后续访问将返回更新后的值，且一次写入将保证取代前一次写入。与进程A无因果关系的进程C的访问遵守一般的最终一致性规则。</li>
<li><strong>&ldquo;读己之所写（read-your-writes）&rdquo;一致性</strong>。当进程A自己更新一个数据项之后，它总是访问到更新过的值，绝不会看到旧值。这是因果一致性模型的一个特例。</li>
<li><strong>会话（Session）一致性</strong>。这是上一个模型的实用版本，它把访问存储系统的进程放到会话的上下文中。只要会话还存在，系统就保证&ldquo;读己之所写&rdquo;一致性。如果由于某些失败情形令会话终止，就要建立新的会话，而且系统的保证不会延续到新的会话。</li>
<li><strong>单调（Monotonic）读一致性</strong>。如果进程已经看到过数据对象的某个值，那么任何后续访问都不会返回在那个值之前的值。</li>
<li><strong>单调写一致性</strong>。系统保证来自同一个进程的写操作顺序执行。要是系统不能保证这种程度的一致性，就非常难以编程了。</li>
</ul>
</blockquote>
<p>上述最终一致性的不同方式可以进行组合，例如单调读一致性和读己之所写一致性就可以组合实现。并且从实践的角度来看，这两者的组合，读取自己更新的数据，和一旦读取到最新的版本不会再读取旧版本，对于此架构上的程序开发来说，会少很多额外的烦恼。</p>
<p>从服务端角度，如何尽快将更新后的数据分布到整个系统，降低达到最终一致性的时间窗口，是提高系统的可用度和用户体验非常重要的方面。对于分布式数据系统：</p>
<ul>
<li>N &mdash; 数据复制的份数</li>
<li>W &mdash; 更新数据是需要保证写完成的节点数</li>
<li>R &mdash; 读取数据的时候需要读取的节点数</li>
</ul>
<p>如果W+R&gt;N，写的节点和读的节点重叠，则是强一致性。例如对于典型的一主一备同步复制的关系型数据库，N=2,W=2,R=1，则不管读的是主库还是备库的数据，都是一致的。</p>
<p>如果W+R&lt;=N，则是弱一致性。例如对于一主一备异步复制的关系型数据库，N=2,W=1,R=1，则如果读的是备库，就可能无法读取主库已经更新过的数据，所以是弱一致性。</p>
<p>对于分布式系统，为了保证高可用性，一般设置N&gt;=3。不同的N,W,R组合，是在可用性和一致性之间取一个平衡，以适应不同的应用场景。</p>
<ul>
<li>如果N=W,R=1，任何一个写节点失效，都会导致写失败，因此可用性会降低，但是由于数据分布的N个节点是同步写入的，因此可以保证强一致性。</li>
<li>如果N=R,W=1，只需要一个节点写入成功即可，写性能和可用性都比较高。但是读取其他节点的进程可能不能获取更新后的数据，因此是弱一致性。这种情况下，如果W&lt;(N+1)/2，并且写入的节点不重叠的话，则会存在写冲突</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.heysql.com/wordpress/mysql/cap%e5%8e%9f%e7%90%86%e4%b8%8e%e6%9c%80%e7%bb%88%e4%b8%80%e8%87%b4%e6%80%a7%e8%bd%ac%e8%bd%bd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>由concurrent_insert参数想到的，MyISAM和InnoDB的插入性能和InnoDB的行锁定</title>
		<link>http://www.heysql.com/wordpress/mysql/%e7%94%b1concurrent_insert%e5%8f%82%e6%95%b0%e6%83%b3%e5%88%b0%e7%9a%84%ef%bc%8cmyisam%e5%92%8cinnodb%e7%9a%84%e6%8f%92%e5%85%a5%e6%80%a7%e8%83%bd%e5%92%8cinnodb%e7%9a%84%e8%a1%8c%e9%94%81%e5%ae%9a/</link>
		<comments>http://www.heysql.com/wordpress/mysql/%e7%94%b1concurrent_insert%e5%8f%82%e6%95%b0%e6%83%b3%e5%88%b0%e7%9a%84%ef%bc%8cmyisam%e5%92%8cinnodb%e7%9a%84%e6%8f%92%e5%85%a5%e6%80%a7%e8%83%bd%e5%92%8cinnodb%e7%9a%84%e8%a1%8c%e9%94%81%e5%ae%9a/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 09:37:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[concurrent_insert]]></category>
		<category><![CDATA[插入性能]]></category>
		<category><![CDATA[行锁定]]></category>

		<guid isPermaLink="false">http://www.heysql.com/mysql/%e7%94%b1concurrent_insert%e5%8f%82%e6%95%b0%e6%83%b3%e5%88%b0%e7%9a%84%ef%bc%8cmyisam%e5%92%8cinnodb%e7%9a%84%e6%8f%92%e5%85%a5%e6%80%a7%e8%83%bd%e5%92%8cinnodb%e7%9a%84%e8%a1%8c%e9%94%81%e5%ae%9a/</guid>
		<description><![CDATA[&#160;&#160;&#160; 今天看到concurrent_insert这个参数，解释一下：
&#160;

&#160;&#160;&#160; MyISAM存储引擎有一个系统变量concurrent_insert，专门用以控制其并发插入的行为，其值分别可以为0、1或2。
&#160;&#160;&#160; 当 concurrent_insert设置为0时，不允许并发插入。
&#160;&#160;&#160; 当concurrent_insert设置为1时，如果MyISAM表中没有空洞（即表的中间没有被删除的行），MyISAM允许在一个进程读表的同时，另一个进程从表尾插入记录。这也是MySQL的默认设置。如果有空洞的话虽然不能很好的并发，但是MySQL还是可以使用INSERT DELAYED来提升插入性能(仅适用于MyISAM,MEMORY和ARCHIVE引擎)。
&#160;&#160;&#160; 当 concurrent_insert设置为2时，无论MyISAM表中有没有空洞，都允许在表尾并发插入记录，这时MySQL允许INSERT和SELECT语句在中间没有空数据块的MyISAM表中并行运行。
&#160;&#160;&#160; 注：holes&#8211; 空洞这个概念是myisam引擎特有的,myisam在存储时数据文件是顺序的,当有删除操作时,会发生数据文件的空洞.
当有新数据插入时,先查看空洞空间能否能够插入这条数据(concurrent_insert为2时不用判断),否则插入到末端，此设置只对myisam引擎有效,innodb存储方式有自己独有的方法,不会产生数据空洞。
&#160;&#160;&#160; 那么InnoDB呢，它能不能做到INSERT和SELECT并发呢？这里有个情况说明一下，当这个InnoDB表有索引时当然可以并发(行级锁，只要不连累到，因为因为InnoDB行锁的实现是在索引项上加锁实现的，不同于Oracle的在数据块对行进行加锁，而语句写得不好连累到不相关的行都会被锁定。)，但是没有呢？
&#160;&#160;&#160; 先建立一个测试表CurrentTable(注意没有索引)：

&#160;&#160;&#160; 然后插入999条数据。
&#160;&#160;&#160; 接着显式开始事务1：执行插入操作

另一个终端上对该表进行select是可以的，这个可以理解，因为只是S锁。

但是另一个终端上进行select &#8230; for update的话就出现hanging了。

hanging
从上面的例子也能很清楚的理解(InnoDB行锁的实现是在索引项上加锁实现的)这句话。
而同样的表，我创建了基于ID的主键聚集索引以后，同样的场景，select &#8230; for update是可以顺利执行的。
而当该表使用的是MyISAM引擎时，不但select可以执行，select &#8230; for update也可以(在数据文件层面实现了新插入行和更改现有行的隔离并发执行)。
&#160;
&#160;&#160;&#160; 从上面的一些只言片语中应该能感觉到是不是插入性能上MyISAM比InnoDB强呢，虽然这里是讨论的insert和select并发及锁定的机制问题。
&#160;&#160;&#160; 确实，MyISAM的插入性能优于InnoDB，具体参见这篇realzyy的博文。
]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp; 今天看到<span>concurrent_insert这个参数，解释一下：</span></p>
<p><p>&nbsp;</p>
</p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt">&nbsp;&nbsp;&nbsp; MyISAM存储引擎有一个系统变量concurrent_insert，专门用以控制其并发插入的行为，其值分别可以为0、1或2。</p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt">&nbsp;&nbsp;&nbsp; 当 concurrent_insert设置为0时，不允许并发插入。</p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt">&nbsp;&nbsp;&nbsp; 当concurrent_insert设置为1时，如果MyISAM表中没有空洞（即表的中间没有被删除的行），MyISAM允许在一个进程读表的同时，另一个进程从表尾插入记录。这也是MySQL的默认设置。如果有空洞的话虽然不能很好的并发，但是MySQL还是可以使用<font color="#ff0000"><a href="http://dev.mysql.com/doc/refman/5.1/en/insert-delayed.html">INSERT DELAYED</a></font>来提升插入性能(仅适用于MyISAM,MEMORY和ARCHIVE引擎)。</p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt">&nbsp;&nbsp;&nbsp; 当 concurrent_insert设置为2时，无论MyISAM表中有没有空洞，都允许在表尾并发插入记录，<font color="#ff0000">这时</font><font color="#ff0000"><span>MySQL</span>允许<span>INSERT</span>和<span>SELECT</span>语句在中间没有空数据块的<span>MyISAM</span>表中并行运行。</font></p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt"><font color="#ff0000">&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">注：holes&ndash; 空洞这个概念是myisam引擎特有的,myisam在存储时数据文件是顺序的,当有删除操作时,会发生数据文件的空洞.<br />
当有新数据插入时,先查看空洞空间能否能够插入这条数据(concurrent_insert为2时不用判断),否则插入到末端，</font><font color="#0000ff">此设置只对myisam引擎有效,innodb存储方式有自己独有的方法,不会产生数据空洞。</font></p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt"><font color="#000000">&nbsp;&nbsp;&nbsp; 那么InnoDB呢，它能不能做到INSERT和SELECT并发呢？这里有个情况说明一下，当这个InnoDB表有索引时当然可以并发(<font color="#ff0000">行级锁，只要不连累到，因为因为InnoDB行锁的实现是在索引项上加锁实现的，不同于Oracle的在数据块对行进行加锁，而语句写得不好连累到不相关的行都会被锁定</font>。)，但是没有呢？</font></p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt"><font color="#000000">&nbsp;&nbsp;&nbsp; 先建立一个测试表CurrentTable(<font color="#ff0000">注意没有索引</font>)：</font></p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt"><font color="#000000"><img alt="" src="http://pic.yupoo.com/nosql/28815913e08c/r0lagexp.jpg" /></font></p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt"><font color="#000000">&nbsp;&nbsp;&nbsp; 然后插入999条数据。</font></p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt"><font color="#000000">&nbsp;&nbsp;&nbsp; 接着显式开始事务1：执行插入操作</font></p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt"><font color="#000000"><img class="" alt="" src="http://pic.yupoo.com/nosql/65481913e08d/61dyd0v7.jpg" /></font></p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt"><font color="#000000">另一个终端上对该表进行select是可以的，这个可以理解，因为只是S锁。</font></p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt"><font color="#000000"><img class="" alt="" src="http://pic.yupoo.com/nosql/93623913e72a/bbkhw5n2.jpg" /></font></p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt"><font color="#000000">但是另一个终端上进行select &#8230; for update的话就出现hanging了。</font></p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt"><font color="#000000"><img class="" alt="" src="http://pic.yupoo.com/nosql/93781913e08d/ujrjccdc.jpg" /></font></p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt"><font color="#ff0000">hanging</font></p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt"><font color="#ff0000">从上面的例子也能很清楚的理解(InnoDB行锁的实现是在索引项上加锁实现的)这句话。</font></p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt"><font color="#ff0000">而同样的表，我创建了基于ID的主键聚集索引以后，同样的场景，select &#8230; for update是可以顺利执行的。</font></p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt">而当该表使用的是MyISAM引擎时，不但select可以执行，select &#8230; for update也可以(<font color="#0000ff">在数据文件层面实现了新插入行和更改现有行的隔离并发执行</font>)。</p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt">&nbsp;</p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt">&nbsp;&nbsp;&nbsp; 从上面的一些只言片语中应该能感觉到是不是插入性能上MyISAM比InnoDB强呢，虽然这里是讨论的insert和select并发及锁定的机制问题。</p>
<p style="text-indent: -21pt; margin: 5pt 0cm 0pt 21pt">&nbsp;&nbsp;&nbsp; 确实，MyISAM的插入性能优于InnoDB，具体参见这篇realzyy的<a href="http://www.realzyy.com/?p=20">博文</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heysql.com/wordpress/mysql/%e7%94%b1concurrent_insert%e5%8f%82%e6%95%b0%e6%83%b3%e5%88%b0%e7%9a%84%ef%bc%8cmyisam%e5%92%8cinnodb%e7%9a%84%e6%8f%92%e5%85%a5%e6%80%a7%e8%83%bd%e5%92%8cinnodb%e7%9a%84%e8%a1%8c%e9%94%81%e5%ae%9a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>COMMIT AND CHAIN and ROLLBACK AND CHAIN</title>
		<link>http://www.heysql.com/wordpress/other/commit-and-chain-and-rollback-and-chain/</link>
		<comments>http://www.heysql.com/wordpress/other/commit-and-chain-and-rollback-and-chain/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 07:17:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[琐碎的其他]]></category>
		<category><![CDATA[CHAIN]]></category>
		<category><![CDATA[COMMIT]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[ROLLBACK]]></category>

		<guid isPermaLink="false">http://www.heysql.com/other/commit-and-chain-and-rollback-and-chain/</guid>
		<description><![CDATA[COMMIT AND CHAIN and ROLLBACK AND CHAIN COMMIT RELEASE and ROLLBACK RELEASE 应用场景或者是什么实际的例子，只知道CHAIN是以相同隔离等级开始新事物后者是释放并断开与服务器连接，谁有，不理解它们的使用背景，Mark一下。
]]></description>
			<content:encoded><![CDATA[<p>COMMIT AND CHAIN and ROLLBACK AND CHAIN COMMIT RELEASE and ROLLBACK RELEASE 应用场景或者是什么实际的例子，只知道CHAIN是以相同隔离等级开始新事物后者是释放并断开与服务器连接，谁有，不理解它们的使用背景，Mark一下。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heysql.com/wordpress/other/commit-and-chain-and-rollback-and-chain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
