<?xml version="1.0" encoding="gb2312"?>
<rss version="2.0">
<channel>
<title><![CDATA[那一剑的风情]]></title>
        <image>
        <title>http://hi.baidu.com</title>
        <link>http://hi.baidu.com</link>
        <url>http://img.baidu.com/img/logo-hi.gif</url>
        </image>
<description><![CDATA[那一剑的风情]]></description>
<link>http://hi.baidu.com/yzx110</link>
<language>zh-cn</language>
<generator>www.baidu.com</generator>
<ttl>5</ttl>


<item>
        <title><![CDATA[上线这档子事]]></title>
        <link><![CDATA[http://hi.baidu.com/yzx110/blog/item/dcc3db33e5e2f649ad4b5f81.html]]></link>
        <description><![CDATA[
		
		&#160;&#160;&#160;&#160; 历时2周的上线终于算是完成了，虽然算不上是完美，但也总算基本顺利。过程中出了几次问题，但总算万幸没有出现大漏子，及时根据问题调整方法，逐步解决了问题。<br>
<br>
如果要算上上线前的一些上线准备工作，总时间接近3周了，除了整个系统第一版的上线外，都没有那么费心过。虽然在以前工作也有过通宵上线的经历，但是系统规模却小得太多了，一个晚上就全搞定。<br>
<br>
上线这档子事，说简单的话就是个体力活，拿着新代码发布出去就可以。说复杂的话那就是需要耐心、细心、全局观、细节掌控能力、系统熟 <a href="http://hi.baidu.com/yzx110/blog/item/dcc3db33e5e2f649ad4b5f81.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/yzx110/blog/category/%C6%E4%CB%FB">其他</a>&nbsp;<a href="http://hi.baidu.com/yzx110/blog/item/dcc3db33e5e2f649ad4b5f81.html#comment">查看评论</a>]]></description>
        <pubDate>2009-09-26  01:04</pubDate>
        <category><![CDATA[其他]]></category>
        <author><![CDATA[星月浪子]]></author>
		<guid>http://hi.baidu.com/yzx110/blog/item/dcc3db33e5e2f649ad4b5f81.html</guid>
</item>

<item>
        <title><![CDATA[PHP参数传递-值传递陷阱]]></title>
        <link><![CDATA[http://hi.baidu.com/yzx110/blog/item/3da87ed94c1522e039012f17.html]]></link>
        <description><![CDATA[
		
		接文章：<a href="http://hi.baidu.com/yzx110/blog/item/4a6337facd3359809f51460f.html" target="_blank">PHP里使用引用变量时容易犯的错</a> 中的示例<br>
 <br>
&nbsp;&nbsp;  foreach($arr as &amp;$element) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    //modify $element<br>
&nbsp;&nbsp;    }<br>
&nbsp;&nbsp;  当循环操作完后，你再次调用了某个复制或者函数来保存$arr数组，例如：<br>
&nbsp;&nbsp;  set_var(&quot;arr&quot;, $arr);<br>
&nbsp;&nbsp;  <br>
&nbsp;&nbsp;  这时候你认为被设置的$arr就是你想要的那个 <a href="http://hi.baidu.com/yzx110/blog/item/3da87ed94c1522e039012f17.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/yzx110/blog/category/Php">Php</a>&nbsp;<a href="http://hi.baidu.com/yzx110/blog/item/3da87ed94c1522e039012f17.html#comment">查看评论</a>]]></description>
        <pubDate>2009-06-26  10:20</pubDate>
        <category><![CDATA[Php]]></category>
        <author><![CDATA[星月浪子]]></author>
		<guid>http://hi.baidu.com/yzx110/blog/item/3da87ed94c1522e039012f17.html</guid>
</item>

<item>
        <title><![CDATA[PHP里使用引用变量时容易犯的错]]></title>
        <link><![CDATA[http://hi.baidu.com/yzx110/blog/item/4a6337facd3359809f51460f.html]]></link>
        <description><![CDATA[
		
		&nbsp;&nbsp;   一个场景：<br>
&nbsp;&nbsp;   foreach($arr as &amp;$element) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   //modify $element<br>
&nbsp;&nbsp;   }<br>
&nbsp;&nbsp;   这种用法是最近常见的，但是这里隐藏一个严重的问题。由于$element变量的作用域是在整个函数（假如这个循环是在某个函数里），如果$element这个变量被foreach这个循环之后的代码再次使用并对其作修改操作时，问题就发生了。因为在循环里$element是个引用变量，如果再对$element赋值那么相当于修改了原有$element所指的内容，例如：<br>
&nbsp; <a href="http://hi.baidu.com/yzx110/blog/item/4a6337facd3359809f51460f.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/yzx110/blog/category/Php">Php</a>&nbsp;<a href="http://hi.baidu.com/yzx110/blog/item/4a6337facd3359809f51460f.html#comment">查看评论</a>]]></description>
        <pubDate>2009-06-26  10:09</pubDate>
        <category><![CDATA[Php]]></category>
        <author><![CDATA[星月浪子]]></author>
		<guid>http://hi.baidu.com/yzx110/blog/item/4a6337facd3359809f51460f.html</guid>
</item>

<item>
        <title><![CDATA[mysql索引的一个技巧]]></title>
        <link><![CDATA[http://hi.baidu.com/yzx110/blog/item/9297d5ca611b984ef31fe759.html]]></link>
        <description><![CDATA[
		
		 针对select * from table where col1 &gt; number order by col2 desc。<br>
<br>
  其实按照常规的方法可以这样设计：key(col1, col2)<br>
<br>
  但是这种办法在mysql里不算是理想的，where条件里限定索引前部分是一个范围的情况下后面的order by还是会有filesort。如果where条件里限定索引前部分是一个常量，那么order by就会有效利用索引。例如：select * from table where col1 = number order by col2 desc，explain的结果就不错。<br>
<br>
  为了让它能够利用上索引并且消除filesort，可以这样设计<br>
  索引：key(col2,col1) <a href="http://hi.baidu.com/yzx110/blog/item/9297d5ca611b984ef31fe759.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/yzx110/blog/category/%CA%FD%BE%DD%BF%E2">数据库</a>&nbsp;<a href="http://hi.baidu.com/yzx110/blog/item/9297d5ca611b984ef31fe759.html#comment">查看评论</a>]]></description>
        <pubDate>2009-04-30  18:06</pubDate>
        <category><![CDATA[数据库]]></category>
        <author><![CDATA[星月浪子]]></author>
		<guid>http://hi.baidu.com/yzx110/blog/item/9297d5ca611b984ef31fe759.html</guid>
</item>

<item>
        <title><![CDATA[mysql的error_log还是弱了点]]></title>
        <link><![CDATA[http://hi.baidu.com/yzx110/blog/item/6867718d5e9c431ab21bba3d.html]]></link>
        <description><![CDATA[
		
		 莫名奇妙的server gone away发生了，你怎么定位错误？我看在mysql下很多时候就靠猜了，<br>
 innodb数据文件和表结构不匹配？<br>
 配置错误导致内存空间不够？<br>
 ....<br>
<br>
 在我发现的好几次奇怪的mysqld挂掉后再重启的情景里面，mysql都没有记录出错信息，怎么办？只有靠猜了，这完全就只能靠经验办事了.....<br>
<br>
<br>
 这个错误日志确实有点弱。 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/yzx110/blog/category/%CA%FD%BE%DD%BF%E2">数据库</a>&nbsp;<a href="http://hi.baidu.com/yzx110/blog/item/6867718d5e9c431ab21bba3d.html#comment">查看评论</a>]]></description>
        <pubDate>2009-04-20  15:13</pubDate>
        <category><![CDATA[数据库]]></category>
        <author><![CDATA[星月浪子]]></author>
		<guid>http://hi.baidu.com/yzx110/blog/item/6867718d5e9c431ab21bba3d.html</guid>
</item>

<item>
        <title><![CDATA[还是binlog切换的问题]]></title>
        <link><![CDATA[http://hi.baidu.com/yzx110/blog/item/b8f35bee01be37f3b3fb9524.html]]></link>
        <description><![CDATA[
		
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  继上次<a href="http://hi.baidu.com/yzx110/blog/item/3aa67f1ef3bd12f31ad57675.html" target="_blank"> binlog切换时会阻塞更新</a> ，最近还发现它不光阻塞更新，如果设置了replication那么它对从库的查询也有影响。<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  在binlog切换时，会有一个Rotate_log_event产生，而slave同步到此event后也会让Relay-log切换。由于mysql写这种日志都是写入系统缓存后就不管了，导致切换文件时需要对旧文件进行fdatasync，这时候瞬间io压力会过大，耗时较长。这种情况 <a href="http://hi.baidu.com/yzx110/blog/item/b8f35bee01be37f3b3fb9524.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/yzx110/blog/category/%CA%FD%BE%DD%BF%E2">数据库</a>&nbsp;<a href="http://hi.baidu.com/yzx110/blog/item/b8f35bee01be37f3b3fb9524.html#comment">查看评论</a>]]></description>
        <pubDate>2009-04-10  16:39</pubDate>
        <category><![CDATA[数据库]]></category>
        <author><![CDATA[星月浪子]]></author>
		<guid>http://hi.baidu.com/yzx110/blog/item/b8f35bee01be37f3b3fb9524.html</guid>
</item>

<item>
        <title><![CDATA[myisam vs innodb感受]]></title>
        <link><![CDATA[http://hi.baidu.com/yzx110/blog/item/19b2257fd9263d0028388a12.html]]></link>
        <description><![CDATA[
		
		&nbsp;&nbsp;       <br>
&nbsp;&nbsp;&nbsp;      真是太久没来写博客了，偶尔心里似乎有些感觉像欠了什么似的，但是没啥可写也感觉不想写，因为我已经定位此博客为技术路线，不愿其他的事情掺进来。言归正传，说说最近干的一些事吧。<br>
<br>
&nbsp;&nbsp;&nbsp;      从我使用mysql以来，我见过的都是用myisam作为存储引擎的首选，并且mysql doc也对myisam表扬有嘉，所以在大部分时候我都使用myisam。而在最近的一些测试中，myisam却没有想像中那么优秀。<br>
<br>
&nbsp;&nbsp;&nbsp;     确实myisam更新速度非常快，因为结构精简 <a href="http://hi.baidu.com/yzx110/blog/item/19b2257fd9263d0028388a12.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/yzx110/blog/category/%CA%FD%BE%DD%BF%E2">数据库</a>&nbsp;<a href="http://hi.baidu.com/yzx110/blog/item/19b2257fd9263d0028388a12.html#comment">查看评论</a>]]></description>
        <pubDate>2009-03-24  11:36</pubDate>
        <category><![CDATA[数据库]]></category>
        <author><![CDATA[星月浪子]]></author>
		<guid>http://hi.baidu.com/yzx110/blog/item/19b2257fd9263d0028388a12.html</guid>
</item>

<item>
        <title><![CDATA[varchar(10) 和varchar(100)的区别？]]></title>
        <link><![CDATA[http://hi.baidu.com/yzx110/blog/item/ec6a0ef3b71530cc0b46e02f.html]]></link>
        <description><![CDATA[
		
		&nbsp;&nbsp;   这两个类型，如果只存储hello这个字符串的话，存储空间都没有区别的都是6bytes。<br>
&nbsp;&nbsp;   但是真没有区别么？其实是有的，mysql在处理数据的时候需要分配内存，而内存的分配都是fixed-size的，所以它只能按照最大的可能来分配，这样varchar(10)和varchar(100)就差别大了。而blob/text字段在处理时内存分配则有所不同，mysql会按照已经发现的最大长度来分配内存。如果查询时有filesort，处理是类似的。<br>
<br>
&nbsp;&nbsp;   所以字段长度只要是满足了需求，那么设置的尽可能小是没错的。 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/yzx110/blog/category/%CA%FD%BE%DD%BF%E2">数据库</a>&nbsp;<a href="http://hi.baidu.com/yzx110/blog/item/ec6a0ef3b71530cc0b46e02f.html#comment">查看评论</a>]]></description>
        <pubDate>2008-12-03  21:18</pubDate>
        <category><![CDATA[数据库]]></category>
        <author><![CDATA[星月浪子]]></author>
		<guid>http://hi.baidu.com/yzx110/blog/item/ec6a0ef3b71530cc0b46e02f.html</guid>
</item>

<item>
        <title><![CDATA[mysql 字符比较bug]]></title>
        <link><![CDATA[http://hi.baidu.com/yzx110/blog/item/147761272df2b004918f9dea.html]]></link>
        <description><![CDATA[
		
		  bug描述在 http://bugs.mysql.com/bug.php?id=25420，<br>
  <br>
  字符比较的问题我们已经上过好几次当了，特别在混合字符集环境下的时候，这更是一个难产的问题。<br>
&nbsp;&nbsp;  天知道哪天能够统一到utf8啊:)<br>
<br>
&nbsp;&nbsp;  各位使用的时候要注意了 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/yzx110/blog/category/%CA%FD%BE%DD%BF%E2">数据库</a>&nbsp;<a href="http://hi.baidu.com/yzx110/blog/item/147761272df2b004918f9dea.html#comment">查看评论</a>]]></description>
        <pubDate>2008-12-01  15:49</pubDate>
        <category><![CDATA[数据库]]></category>
        <author><![CDATA[星月浪子]]></author>
		<guid>http://hi.baidu.com/yzx110/blog/item/147761272df2b004918f9dea.html</guid>
</item>

<item>
        <title><![CDATA[MySQL在切换binlog时会阻塞更新]]></title>
        <link><![CDATA[http://hi.baidu.com/yzx110/blog/item/3aa67f1ef3bd12f31ad57675.html]]></link>
        <description><![CDATA[
		
		<font color="#000000">&nbsp;&nbsp;  版本<st1:chsdate isrocdate="False" islunardate="False" day="30" month="12" year="1899"><font face="Arial"><span style="color: navy; ">5.0.51</span></font></st1:chsdate></font><font face="Arial" color="navy"><span style="color: navy; "><font color="#000000">b-log，在max-binlog-size设置为700M或者更大时（这个值可能跟硬件性能有关），当binlog达到设置上限并切换成下一个binlog时，所有的更新语句就会被阻塞，不管多简单的语句。<br>
<br>
&nbsp;&nbsp;</font></span></font> <a href="http://hi.baidu.com/yzx110/blog/item/3aa67f1ef3bd12f31ad57675.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/yzx110/blog/category/%CA%FD%BE%DD%BF%E2">数据库</a>&nbsp;<a href="http://hi.baidu.com/yzx110/blog/item/3aa67f1ef3bd12f31ad57675.html#comment">查看评论</a>]]></description>
        <pubDate>2008-11-11  17:26</pubDate>
        <category><![CDATA[数据库]]></category>
        <author><![CDATA[星月浪子]]></author>
		<guid>http://hi.baidu.com/yzx110/blog/item/3aa67f1ef3bd12f31ad57675.html</guid>
</item>

<item>
        <title><![CDATA[Google Reader终于加入翻译功能了]]></title>
        <link><![CDATA[http://hi.baidu.com/yzx110/blog/item/19f0a6c25ce8c91c0ff47705.html]]></link>
        <description><![CDATA[
		
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  以前在做鲜果的时候，我就觉得翻译这个东西在阅读器里面会相当有用。在的互联网上，阅读和翻译已经是分不开的一对了。很早的时候有到阅读器推出了一个翻译功能，遗憾的是，那只能翻译一个词。现在看到Google Reader推出这样的功能，不过Google Reader的实现也不如人意，因为它只能从阅读器点到原文的时候给你翻译。<br>
<br>
&nbsp;&nbsp;  <a href="http://www.cnbeta.com/articles/69443.htm" target="_blank">http://www.cnbeta.com/articles/69443.htm </a> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/yzx110/blog/category/%C6%E4%CB%FB">其他</a>&nbsp;<a href="http://hi.baidu.com/yzx110/blog/item/19f0a6c25ce8c91c0ff47705.html#comment">查看评论</a>]]></description>
        <pubDate>2008-11-11  11:38</pubDate>
        <category><![CDATA[其他]]></category>
        <author><![CDATA[星月浪子]]></author>
		<guid>http://hi.baidu.com/yzx110/blog/item/19f0a6c25ce8c91c0ff47705.html</guid>
</item>

<item>
        <title><![CDATA[改变了对Mysql子查询的看法]]></title>
        <link><![CDATA[http://hi.baidu.com/yzx110/blog/item/e694f536f92075360b55a92b.html]]></link>
        <description><![CDATA[
		
		最开始使用SQLServer，我喜欢这么用SQL：select * from table1 where id in (select table1_id from table2 where table2_filed = xxxx) and table1_field = yyy; 这里的一个查询其实会分为两个查询，对table1和对table2的子查询，这样写能让每个查询都尽量使用索引。<br>
<br>
&nbsp;&nbsp;   曾几何时，使用mysql的时候用explain分析查询，发现mysql里面的子查询很慢，而mysql文档里很多时候也推荐使用join，于是我认定了mysql的子查询实现的很烂，以后的程序里面都用join了。例如上面的查询我就写成：select a.* from table1 a join  <a href="http://hi.baidu.com/yzx110/blog/item/e694f536f92075360b55a92b.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/yzx110/blog/category/%CA%FD%BE%DD%BF%E2">数据库</a>&nbsp;<a href="http://hi.baidu.com/yzx110/blog/item/e694f536f92075360b55a92b.html#comment">查看评论</a>]]></description>
        <pubDate>2008-11-04  15:31</pubDate>
        <category><![CDATA[数据库]]></category>
        <author><![CDATA[星月浪子]]></author>
		<guid>http://hi.baidu.com/yzx110/blog/item/e694f536f92075360b55a92b.html</guid>
</item>

<item>
        <title><![CDATA[linux上ext2文件系统中，用debugfs来恢复被删除的文件]]></title>
        <link><![CDATA[http://hi.baidu.com/yzx110/blog/item/7734372af3d4853e5343c197.html]]></link>
        <description><![CDATA[
		
		&nbsp;&nbsp;&nbsp;&nbsp;    如果你不小心用rm -rf xxx删除了文件或者整个目录，在ext2文件系统上是可以恢复的。因为文件数据没有被实际删除，只是索引被删除了，文件被误删除之后，应该马上停止创建、修改等文件操作，因为他们有可能会覆盖以前被删除文件所占用的磁盘空间，这样就没办法恢复了。<br>
&nbsp;&nbsp;&nbsp;    如果只有一个文件，那么运行：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    debugfs /dev/sda2; // <strong>/dev/sda2是你要查看的设备</strong><br>
&nbsp;&nbsp;&nbsp; <a href="http://hi.baidu.com/yzx110/blog/item/7734372af3d4853e5343c197.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/yzx110/blog/category/%B1%E0%B3%CC%CF%E0%B9%D8">编程相关</a>&nbsp;<a href="http://hi.baidu.com/yzx110/blog/item/7734372af3d4853e5343c197.html#comment">查看评论</a>]]></description>
        <pubDate>2008-09-10  17:01</pubDate>
        <category><![CDATA[编程相关]]></category>
        <author><![CDATA[星月浪子]]></author>
		<guid>http://hi.baidu.com/yzx110/blog/item/7734372af3d4853e5343c197.html</guid>
</item>

<item>
        <title><![CDATA[速度！RIA的希望]]></title>
        <link><![CDATA[http://hi.baidu.com/yzx110/blog/item/9f8d3b0140303e087bec2c1e.html]]></link>
        <description><![CDATA[
		
		&nbsp;&nbsp;&nbsp;&nbsp;  自从ajax兴起之后，页面加载速度就逐日下降。当然你可以说页面复杂了，js代码多了，所以速度下降了，但这并不是理由。自从上次用过safari之后，我就更加证实这一点，因为js在复杂，都还是达不到后端代码的复杂程度，后端页面能做到100ms以下的加在速度，浏览器上为什么不能？<br>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  现在尝试了Google Chrome，感觉浏览器速度又上了一个台阶。虽然Chrome短时间内无法达到别的浏览器的普及率，但是它让我看到了希望。看到了RIA的希望。 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/yzx110/blog/category/%C6%E4%CB%FB">其他</a>&nbsp;<a href="http://hi.baidu.com/yzx110/blog/item/9f8d3b0140303e087bec2c1e.html#comment">查看评论</a>]]></description>
        <pubDate>2008-09-03  11:29</pubDate>
        <category><![CDATA[其他]]></category>
        <author><![CDATA[星月浪子]]></author>
		<guid>http://hi.baidu.com/yzx110/blog/item/9f8d3b0140303e087bec2c1e.html</guid>
</item>

<item>
        <title><![CDATA[CakePHP View Cache的一个问题]]></title>
        <link><![CDATA[http://hi.baidu.com/yzx110/blog/item/1cefa41e649bad19413417d7.html]]></link>
        <description><![CDATA[
		
		&nbsp;&nbsp;&nbsp;   最近一直在使用CakePHP，感觉挺不错。不过这几天在使用View Cache的时候却发现一个问题：URL带查询参数时总是不命中缓存。查看代码后发现问题所在，原来在View中使用CacheHelper类来处理缓存，每次保存缓存时采用的文件路径是：<br>
&nbsp;&nbsp;&nbsp;   $cache = convertSlash($this-&gt;here); //这里采用$this-&gt;here，$this-&gt;here是app/config/routes.php里配置的路径，不带查询参数的。<br>
&nbsp;&nbsp;&nbsp;   $cache = $cache . '.php';<br>
&nbsp;&nbsp;   return cache('views' . DS . $cache, $ <a href="http://hi.baidu.com/yzx110/blog/item/1cefa41e649bad19413417d7.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/yzx110/blog/category/Php">Php</a>&nbsp;<a href="http://hi.baidu.com/yzx110/blog/item/1cefa41e649bad19413417d7.html#comment">查看评论</a>]]></description>
        <pubDate>2008-08-14  00:04</pubDate>
        <category><![CDATA[Php]]></category>
        <author><![CDATA[星月浪子]]></author>
		<guid>http://hi.baidu.com/yzx110/blog/item/1cefa41e649bad19413417d7.html</guid>
</item>


</channel>
</rss>