<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feeds.feedsky.com/styles/temp01.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feeds.feedsky.com/csdn.net/qiuye402" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feeds.feedsky.com/csdn.net/qiuye402" type="application/rss+xml"></fs:self_link><lastBuildDate>Sat, 30 May 2009 00:42:00 GMT</lastBuildDate><title>方伟的专栏</title><description>java,j2ee,web,AJAX,Struts,Spring,Hibernate,WebSphere,DB2,AIX,IBM</description><link>http://blog.csdn.net/qiuye402/</link><item><title>根据status信息对MySQL服务器进行优化</title><link>http://blog.csdn.net/qiuye402/archive/2009/05/30/4225123.aspx</link><wfw:comment>http://blog.csdn.net/qiuye402/comments/4225123.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/qiuye402/comments/commentRss/4225123.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4225123</trackback:ping><description>&lt;br /&gt;网上有很多的文章教怎么配置MySQL服务器，但考虑到服务器硬件配置的不同，具体应用的差别，那些文章的做法只能作为初步设置参考，我们需要根据自己的情况进行配置优化，好的做法是MySQL服务器稳定运行了一段时间后运行，根据服务器的”状态”进行优化。&lt;br /&gt;mysql&gt; show global status;&lt;br /&gt;可以列出MySQL服务器运行各种状态值，另外，查询MySQL服务器配置信息语句：&lt;br /&gt;mysql&gt; show variables;&lt;br /&gt;一、慢查询mysql&gt; show variables like '%slow%';&lt;br /&gt;+------------------+-------+&lt;br /&gt;| Variable_name     | Value |&lt;br /&gt;+------------------+-------+&lt;br /&gt;| log_slow_queries | ON     |&lt;br /&gt;| slow_launch_time | 2      |&lt;br /&gt;+------------------+-------+&lt;br /&gt;&lt;br /&gt;&lt;img src =&quot;http://blog.csdn.net/qiuye402/aggbug/4225123.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/225516985/qiuye402/csdn.net/s.gif?r=http://blog.csdn.net/qiuye402/archive/2009/05/30/4225123.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/qiuye402/225516985/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/qiuye402/225516985/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 30 May 2009 08:42:00 +0800</pubDate><author>方伟</author><comments>http://blog.csdn.net/qiuye402/archive/2009/05/30/4225123.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/qiuye402/archive/2009/05/30/4225123.aspx</guid><dc:creator>方伟</dc:creator><fs:srclink>http://blog.csdn.net/qiuye402/archive/2009/05/30/4225123.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/qiuye402/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/qiuye402/~1214362/225516985/1214335</fs:itemid></item><item><title>mysql对InnoDB表的限制</title><link>http://blog.csdn.net/qiuye402/archive/2009/05/30/4225121.aspx</link><wfw:comment>http://blog.csdn.net/qiuye402/comments/4225121.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/qiuye402/comments/commentRss/4225121.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4225121</trackback:ping><description>&lt;br /&gt;对InnoDB表的限制&lt;br /&gt;· 一个表不能包含超过1000列。&lt;br /&gt;· 内部最大键长度是3500字节，但MySQL自己限制这个到1024字节。&lt;br /&gt;· 除了VARCHAR, BLOB和TEXT列，最大行长度稍微小于数据库页的一半。即，最大行长度大约8000字节。LONGBLOB和LONGTEXT列必须小于4GB, 总的行长度，页包括BLOB和TEXT列，必须小于4GB。InnoDB在行中存储VARCHAR，BLOB或TEXT列的前768字节，余下的存储的分散的页面中。&lt;br /&gt;· 虽然InnoDB内部地支持行尺寸大于65535，你不能定义一个包含VARCHAR列的，合并尺寸大于65535的行。·                mysql&gt; CREATE TABLE t (a VARCHAR(8000), b VARCHAR(10000),·                    -&gt; c VARCHAR(10000), d VARCHAR(10000), e VARCHAR(10000),·                    -&gt; f VARCHAR&lt;img src =&quot;http://blog.csdn.net/qiuye402/aggbug/4225121.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/225516986/qiuye402/csdn.net/s.gif?r=http://blog.csdn.net/qiuye402/archive/2009/05/30/4225121.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/qiuye402/225516986/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/qiuye402/225516986/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 30 May 2009 08:41:00 +0800</pubDate><author>方伟</author><comments>http://blog.csdn.net/qiuye402/archive/2009/05/30/4225121.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/qiuye402/archive/2009/05/30/4225121.aspx</guid><dc:creator>方伟</dc:creator><fs:srclink>http://blog.csdn.net/qiuye402/archive/2009/05/30/4225121.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/qiuye402/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/qiuye402/~1214362/225516986/1214335</fs:itemid></item><item><title>MySQL Replication(复制)基本原理</title><link>http://blog.csdn.net/qiuye402/archive/2009/05/30/4225119.aspx</link><wfw:comment>http://blog.csdn.net/qiuye402/comments/4225119.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/qiuye402/comments/commentRss/4225119.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4225119</trackback:ping><description>&lt;br /&gt;1、复制进程&lt;br /&gt;Mysql的复制（replication）是一个异步的复制，从一个Mysql instace（称之为Master）复制到另一个Mysql instance（称之Slave）。实现整个复制操作主要由三个进程完成的，其中两个进程在Slave（Sql进程和IO进程），另外一个进程在 Master（IO进程）上。&lt;br /&gt;&lt;br /&gt;要实施复制，首先必须打开Master端的binary log（bin-log）功能，否则无法实现。因为整个复制过程实际上就是Slave从Master端获取该日志然后再在自己身上完全顺序的执行日志中所记录的各种操作。&lt;br /&gt;复制的基本过程如下：&lt;br /&gt;1)、Slave上面的IO进程连接上Master，并请求从指定日志文件的指定位置（或者从最开始的日志）之后的日志内容；&lt;br /&gt;2)、Master接收到来自Slave的IO进程的请求后，通过负责复制的IO进程根据请求信息读取制定日志指定位置之后的日志信息，返回给Slave 的IO进程。返回信息中除了日志所包含的信息之外，还包括本次返回的信息已经到Master端的bin-l&lt;img src =&quot;http://blog.csdn.net/qiuye402/aggbug/4225119.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/225516987/qiuye402/csdn.net/s.gif?r=http://blog.csdn.net/qiuye402/archive/2009/05/30/4225119.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/qiuye402/225516987/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/qiuye402/225516987/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 30 May 2009 08:39:00 +0800</pubDate><author>方伟</author><comments>http://blog.csdn.net/qiuye402/archive/2009/05/30/4225119.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/qiuye402/archive/2009/05/30/4225119.aspx</guid><dc:creator>方伟</dc:creator><fs:srclink>http://blog.csdn.net/qiuye402/archive/2009/05/30/4225119.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/qiuye402/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/qiuye402/~1214362/225516987/1214335</fs:itemid></item><item><title>MySQL的双机拷贝备份(Replication)的配置</title><link>http://blog.csdn.net/qiuye402/archive/2009/05/30/4225096.aspx</link><wfw:comment>http://blog.csdn.net/qiuye402/comments/4225096.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/qiuye402/comments/commentRss/4225096.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4225096</trackback:ping><description>&lt;br /&gt;在MySQL中双机拷贝备份的实现是依靠日志文件来实现的，当主服务器的数据库有改变时，这些改变会被记录到日志中去，则日志一旦改变则会发送到从服务器，由从服务器来执行这些改变，在MySQL中设置双机拷贝备份其实比较容易，按如下步骤执行即可&lt;br /&gt;1、确保主从服务器的MySQL库是兼容的，具体的兼容问题请查看MySQL官方文档，这里建议主从服务器用一样的数据库版本&lt;br /&gt;2、创建拷贝用户，并赋予replication及slave权限，如grant replication slave on *.* to 'repl'@'%' identified by 'replpass'&lt;br /&gt;3、执行flush tables with read lock来清空所有表和块的写入语句&lt;br /&gt;4、为主服务器的my.cnf设置log_bin以及server_id选项，如&lt;br /&gt;[mysqld]&lt;br /&gt;log_bin=mysql_bin&lt;br /&gt;server_id=1&lt;br /&gt;并重新启动服务器，此时调用show master status将会出现类似如下内容：&lt;br /&gt;+-&lt;img src =&quot;http://blog.csdn.net/qiuye402/aggbug/4225096.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/225516988/qiuye402/csdn.net/s.gif?r=http://blog.csdn.net/qiuye402/archive/2009/05/30/4225096.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/qiuye402/225516988/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/qiuye402/225516988/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 30 May 2009 08:18:00 +0800</pubDate><author>方伟</author><comments>http://blog.csdn.net/qiuye402/archive/2009/05/30/4225096.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/qiuye402/archive/2009/05/30/4225096.aspx</guid><dc:creator>方伟</dc:creator><fs:srclink>http://blog.csdn.net/qiuye402/archive/2009/05/30/4225096.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/qiuye402/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/qiuye402/~1214362/225516988/1214335</fs:itemid></item><item><title>搭建集群负载均衡系统</title><link>http://blog.csdn.net/qiuye402/archive/2009/05/30/4225095.aspx</link><wfw:comment>http://blog.csdn.net/qiuye402/comments/4225095.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/qiuye402/comments/commentRss/4225095.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4225095</trackback:ping><description>&lt;br /&gt;声明：本文是参考大量网上资料以及tigerlei自己的实际操作而写的笔记，仅供大家参考，绝非原创。&lt;br /&gt;搭建集群负载均衡系统&lt;br /&gt;　　负载均衡集群是在应用服务器高负载的情况下，由多台节点提供可伸缩的，高负载的服务器组以保证对外提供良好的服务响应；而LVS就是实现这一功能的技&lt;br /&gt;术.实际上LVS是一种Linux操作系统上基于IP层的负载均衡调度技术，它在操作系统核心层上，将来自IP层的TCP/UDP请求均衡地转移到不同的&lt;br /&gt;服务器，从而将一组服务器构成一个高性能、高可用的虚拟服务器。使用三台机器就可以用LVS实现最简单的集群，如图1所示。 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;图1 LVS实现集群系统结构简图&lt;br /&gt;图1显示一台名为Director的机器是前端负载均衡器，运行LVS，目前只能在Linux下运行.可以针对web、ftp、cache、mms甚至&lt;br /&gt;mysql等服务做load balance;后端两台机器称之为Real&lt;br /&gt;Server，是需要负载均衡的服务器，可以为各类系统，Linux、Solaris、Aix、BSD、W&lt;img src =&quot;http://blog.csdn.net/qiuye402/aggbug/4225095.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/225516989/qiuye402/csdn.net/s.gif?r=http://blog.csdn.net/qiuye402/archive/2009/05/30/4225095.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/qiuye402/225516989/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/qiuye402/225516989/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 30 May 2009 08:17:00 +0800</pubDate><author>方伟</author><comments>http://blog.csdn.net/qiuye402/archive/2009/05/30/4225095.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/qiuye402/archive/2009/05/30/4225095.aspx</guid><dc:creator>方伟</dc:creator><fs:srclink>http://blog.csdn.net/qiuye402/archive/2009/05/30/4225095.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/qiuye402/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/qiuye402/~1214362/225516989/1214335</fs:itemid></item><item><title>mysql双机</title><link>http://blog.csdn.net/qiuye402/archive/2009/05/29/4224941.aspx</link><wfw:comment>http://blog.csdn.net/qiuye402/comments/4224941.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/qiuye402/comments/commentRss/4224941.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4224941</trackback:ping><description>&lt;br /&gt;最近一直在搞mysql双机同步，在这里做个小结： &lt;br /&gt;方法一：（只修改从机配置，主机不做任何更改） &lt;br /&gt;主机：Host;从机：Slave. &lt;br /&gt;1）将Slave数据库data目录清空，再将Host1数据库data目录下的所有文件完全拷贝过来。 &lt;br /&gt;2）修改SlaveMysql的配置文件my.ini（Windows C:/MysqlServer5.0/下）或my.cnf（Linux /etc/my.cnf下） &lt;br /&gt;在[mysql]配置项下添加： &lt;br /&gt;server-id=2 &lt;br /&gt;master-host=192.168.0.1 &lt;br /&gt;master-user=backup #同步用户帐号 &lt;br /&gt;master-password=123456 &lt;br /&gt;master-port=3306 &lt;br /&gt;master-connect-retry=30 预设重试间隔30秒 &lt;br /&gt;replicate-do-db=backup 告诉slave只做backup数据库的更新 &lt;br /&gt;3）启动主从机，配置成功后会在Slave&lt;img src =&quot;http://blog.csdn.net/qiuye402/aggbug/4224941.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/225516990/qiuye402/csdn.net/s.gif?r=http://blog.csdn.net/qiuye402/archive/2009/05/29/4224941.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/qiuye402/225516990/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/qiuye402/225516990/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 30 May 2009 07:01:00 +0800</pubDate><author>方伟</author><comments>http://blog.csdn.net/qiuye402/archive/2009/05/29/4224941.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/qiuye402/archive/2009/05/29/4224941.aspx</guid><dc:creator>方伟</dc:creator><fs:srclink>http://blog.csdn.net/qiuye402/archive/2009/05/29/4224941.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/qiuye402/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/qiuye402/~1214362/225516990/1214335</fs:itemid></item><item><title>mysql双机负载均衡的配置过程</title><link>http://blog.csdn.net/qiuye402/archive/2009/05/29/4224940.aspx</link><wfw:comment>http://blog.csdn.net/qiuye402/comments/4224940.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/qiuye402/comments/commentRss/4224940.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4224940</trackback:ping><description>&lt;br /&gt;一、介绍&lt;br /&gt;========&lt;br /&gt;这篇文档旨在介绍如何安装配置基于2台服务器的MySQL集群。并且实现任意一台服务器出现问题或宕机时MySQL依然能够继续运行。&lt;br /&gt;注意！&lt;br /&gt;虽然这是基于2台服务器的MySQL集群，但也必须有额外的第三台服务器作为管理节点，但这台服务器可以在集群启动完成后关闭。同时需要注意的是并不推荐在集群启动完成后关闭作为管理节点的服务器。尽管理论上可以建立基于只有2台服务器的MySQL集群，但是这样的架构，一旦一台服务器宕机之后集群就无法继续正常工作了，这样也就失去了集群的意义了。出于这个原因，就需要有第三台服务器作为管理节点运行。&lt;br /&gt;另外，可能很多朋友都没有3台服务器的实际环境，可以考虑在VMWare或其他虚拟机中进行实验。&lt;br /&gt;下面假设这3台服务的情况：&lt;br /&gt;Server1: mysql1.vmtest.net 192.168.0.1&lt;br /&gt;Server2: mysql2.vmtest.net 192.168.0.2&lt;br /&gt;Server3: mysql3.vmtest.net 192.168.&lt;img src =&quot;http://blog.csdn.net/qiuye402/aggbug/4224940.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/225516991/qiuye402/csdn.net/s.gif?r=http://blog.csdn.net/qiuye402/archive/2009/05/29/4224940.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/qiuye402/225516991/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/qiuye402/225516991/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 30 May 2009 07:00:00 +0800</pubDate><author>方伟</author><comments>http://blog.csdn.net/qiuye402/archive/2009/05/29/4224940.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/qiuye402/archive/2009/05/29/4224940.aspx</guid><dc:creator>方伟</dc:creator><fs:srclink>http://blog.csdn.net/qiuye402/archive/2009/05/29/4224940.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/qiuye402/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/qiuye402/~1214362/225516991/1214335</fs:itemid></item><item><title>MySQL的MERGE存储引擎</title><link>http://blog.csdn.net/qiuye402/archive/2009/05/29/4224931.aspx</link><wfw:comment>http://blog.csdn.net/qiuye402/comments/4224931.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/qiuye402/comments/commentRss/4224931.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4224931</trackback:ping><description>&lt;br /&gt;MYSQL的引擎不是一般的多，这次说到的是MERGE，这个引擎有很多特殊的地方：&lt;br /&gt;MERGE引擎类型允许你把许多结构相同的表合并为一个表。然后，你可以执行查询，从多个表返回的结果就像从一个表返回的结果一样。每一个合并的表必须有同样的表定义。&lt;br /&gt;MERGE存储引擎在下面这种使用场合会最为有用，如果需要把日志纪录不停的录入MySQL数据库，并且每天、每周或者每个月都创建一个单一的表，而且要制作来自多个表的合计查询，MERGE表这时会非常有效。然而，这项功能有局限性。你只能合并MyISAM表而且必须严格遵守相同的表定义的限制。虽然这看起来好像是一个大问题，但是，如果你使用另外一种表类型(例如InnoDB)，这种合并可能就不需要了。&lt;br /&gt;其创建方法如下：&lt;br /&gt;他将多个表在逻辑上当作一个表来查询。他建立后有两个文件， &lt;br /&gt;.frm 表结构定义 &lt;br /&gt;.mrg union表的名字清单&lt;br /&gt;两个基本表: &lt;br /&gt;CREATE TABLE TEST_MERGE_1( &lt;br /&gt;ID INT(5) NOT NULL, &lt;br /&gt;VAL&lt;img src =&quot;http://blog.csdn.net/qiuye402/aggbug/4224931.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/225516992/qiuye402/csdn.net/s.gif?r=http://blog.csdn.net/qiuye402/archive/2009/05/29/4224931.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/qiuye402/225516992/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/qiuye402/225516992/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 30 May 2009 06:55:00 +0800</pubDate><author>方伟</author><comments>http://blog.csdn.net/qiuye402/archive/2009/05/29/4224931.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/qiuye402/archive/2009/05/29/4224931.aspx</guid><dc:creator>方伟</dc:creator><fs:srclink>http://blog.csdn.net/qiuye402/archive/2009/05/29/4224931.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/qiuye402/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/qiuye402/~1214362/225516992/1214335</fs:itemid></item><item><title>MySQL:InnoDB和MyISAM的差别</title><link>http://blog.csdn.net/qiuye402/archive/2009/05/29/4224919.aspx</link><wfw:comment>http://blog.csdn.net/qiuye402/comments/4224919.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/qiuye402/comments/commentRss/4224919.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4224919</trackback:ping><description>&lt;br /&gt;InnoDB和MyISAM是在使用MySQL最常用的两个表类型，各有优缺点，视具体应用而定。下面是已知的两者之间的差别，仅供参考。&lt;br /&gt;innodb&lt;br /&gt;InnoDB 给 MySQL 提供了具有事务(commit)、回滚(rollback)和崩溃修复能力(crash recovery capabilities)的事务安全(transaction-safe (ACID compliant))型表。InnoDB 提供了行锁(locking on row level)，提供与 Oracle 类型一致的不加锁读取(non-locking read in SELECTs)。这些特性均提高了多用户并发操作的性能表现。在InnoDB表中不需要扩大锁定(lock escalation)，因为 InnoDB 的列锁定(row level locks)适宜非常小的空间。InnoDB 是 MySQL 上第一个提供外键约束(FOREIGN KEY constraints)的表引擎。&lt;br /&gt;InnoDB 的设计目标是处理大容量数据库系统，它的 CPU 利用率是其它基于磁盘的关系数据库&lt;img src =&quot;http://blog.csdn.net/qiuye402/aggbug/4224919.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/225516993/qiuye402/csdn.net/s.gif?r=http://blog.csdn.net/qiuye402/archive/2009/05/29/4224919.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/qiuye402/225516993/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/qiuye402/225516993/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 30 May 2009 06:50:00 +0800</pubDate><author>方伟</author><comments>http://blog.csdn.net/qiuye402/archive/2009/05/29/4224919.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/qiuye402/archive/2009/05/29/4224919.aspx</guid><dc:creator>方伟</dc:creator><fs:srclink>http://blog.csdn.net/qiuye402/archive/2009/05/29/4224919.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/qiuye402/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/qiuye402/~1214362/225516993/1214335</fs:itemid></item><item><title>mysql MEMORY存储引擎</title><link>http://blog.csdn.net/qiuye402/archive/2009/05/29/4224635.aspx</link><wfw:comment>http://blog.csdn.net/qiuye402/comments/4224635.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/qiuye402/comments/commentRss/4224635.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4224635</trackback:ping><description>&lt;br /&gt;Heap表是最快的表类型，因为它存储在内存里，并使用散列的索引。其缺点是：由于存储在内存中，所有的数据会在出现问题时丢失。他们也不能保留太多的数据（除非你对RAM有很大的预算）。&lt;br /&gt;MEMORY存储引擎用存在内存中的内容来创建表。这些在以前被认识为HEAP表。MEMORY是一个首选的术语，虽然为向下兼容，HEAP依旧被支持。 &lt;br /&gt;每个MEMORY表和一个磁盘文件关联起来。文件名由表的名字开始，并且由一个.frm的扩展名来指明它存储的表定义。 &lt;br /&gt;要明确指出你想要一个MEMORY表，可使用ENGINE选项来指定： &lt;br /&gt;CREATE TABLE t (i INT) ENGINE = MEMORY;&lt;br /&gt;1.表受限于mysqld变量max_heap_table_size(默认16M)；&lt;br /&gt;2.HEAP数据表从MySQL4.1开始才允许使用自增列；&lt;br /&gt;3.ENGINE =Heap;从MySQL4.1后，首选 ENGINE =MEMORY;&lt;br /&gt;4.From MySQL 4.1 on, hash indexes are st&lt;img src =&quot;http://blog.csdn.net/qiuye402/aggbug/4224635.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/225516994/qiuye402/csdn.net/s.gif?r=http://blog.csdn.net/qiuye402/archive/2009/05/29/4224635.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/qiuye402/225516994/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/qiuye402/225516994/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 30 May 2009 03:57:00 +0800</pubDate><author>方伟</author><comments>http://blog.csdn.net/qiuye402/archive/2009/05/29/4224635.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/qiuye402/archive/2009/05/29/4224635.aspx</guid><dc:creator>方伟</dc:creator><fs:srclink>http://blog.csdn.net/qiuye402/archive/2009/05/29/4224635.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/qiuye402/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/qiuye402/~1214362/225516994/1214335</fs:itemid></item></channel></rss>