2014年4月4日

adaptive hash index

摘要: An optimization for InnoDB tables that can speed up lookups using=andINoperators, by constructing ahash indexin memory. MySQL monitors index searches for InnoDB tables, and if queries could benefit from a hash index, it builds one automatically for indexpagesthat are frequently accessed. In a sense, 阅读全文

posted @ 2014-04-04 01:20 Still water run deep 阅读(562) 评论(0) 推荐(0) 编辑

2014年4月3日

InnoDB Double write

摘要: 记得刚开始看InnoDB文档的时候,Double Write一节(其实只有一小段)就让我很困惑。无奈当时内力太浅,纠缠了很久也没弄明白。时隔几个月,重新来整理一下。涉及到的概念:Buffer Pool简称BP,Dirty Page,Log file,Flush,innodb tablespace。1. 什么是Double Write在InnoDB将BP中的Dirty Page刷(flush)到磁盘上时,首先会将Page刷到InnoDB tablespace的一个区域中,我们称该区域为Double write Buffer。在向Double write Buffer写入成功后,再择机将数据拷贝到 阅读全文

posted @ 2014-04-03 01:38 Still water run deep 阅读(259) 评论(0) 推荐(0) 编辑

int(M)与int

摘要: int(M) ,加上zerofill后M才表现出有点效果,比如 int(3) zerofill,你插入到数据库里的是10,则实际插入为010,也就是在前面补充加了一个0.如果int(3)和int(10)不加 zerofill,则它们没有什么区别.M不是用来限制int个数的.int(M)的最大值和最小值与undesigned有关,最下面那副图有说明.mysql> create table t (t int(3) zerofill);Query OK, 0 rows affected (0.00 sec)mysql> insert into t set t = 10;Query OK, 阅读全文

posted @ 2014-04-03 00:46 Still water run deep 阅读(866) 评论(0) 推荐(0) 编辑

MySQL库目录下db.opt文件的作用

摘要: 细心的朋友可能会发现有时候在某些库目录下有个 db.opt 文件,那这个文件是干什么用的呢?如果你用vi等编辑器打开看的话,内容很简单,是用来记录该库的默认字符集编码和字符集排序规则用的。也就是说如果你创建数据库指定默认字符集和排序规则,那么后续创建的表如果没有指定字符集和排序规则,那么该新建的表将采用db.opt文件中指定的属性。/* Set table default charset, if not set SYNOPSIS set_table_default_charset() create_info Table create information DE... 阅读全文

posted @ 2014-04-03 00:28 Still water run deep 阅读(1187) 评论(0) 推荐(0) 编辑

2014年4月2日

MySQL:BlackHole

摘要: MySQL:BlackHole顾名思义BlackHole就是黑洞,只有写入没有输出.现在就来实验一下吧首先查看一下MySQL支持的存储引擎mysql> show engines;+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+| Engine | Support | Comment | Transactions | ... 阅读全文

posted @ 2014-04-02 23:15 Still water run deep 阅读(410) 评论(0) 推荐(0) 编辑

如何最快地实现 ALTER TABLE

摘要: 如果您不了解ALTER TABLE的语法,可以先参考:http://dev.mysql.com/doc/refman/5.1/en/alter-table.html使用ALTER TABLE 可以修改一张表的结构。比如,添加或者删除一个字段,创建或者删除一个索引,修改一个字段的类型,或者重命名一个字段,或者表的一些元信息。我们还可以通过ALTER TABLE来修改表引擎。在大多数情况下,ALTER TABLE通过建立一个原表的拷贝,并在拷贝上修改,然后删除原表,最后修改拷贝的名称为原表名来实现。在执行ALTER TABLE的时候是不能更新(update or insert)数据的, 但是其他的 阅读全文

posted @ 2014-04-02 01:40 Still water run deep 阅读(627) 评论(0) 推荐(0) 编辑

2014年3月22日

How to Read an Engineering Research Paper

摘要: William G. GriswoldCSE, UC San DiegoReading research papers effectively is challenging. These papers are written in a very condensed style because of ... 阅读全文

posted @ 2014-03-22 22:38 Still water run deep 阅读(309) 评论(0) 推荐(0) 编辑

2014年3月17日

Small things are better

摘要: Yesterday I had fun time repairing 1.5Tb ext3 partition, containing many millions of files. Of course it should have never happened – this was decent PowerEdge 2850 box with RAID volume, ECC memory and reliable CentOS 4.4 distribution but still it did. We had “journal failed” message in kernel log a 阅读全文

posted @ 2014-03-17 00:19 Still water run deep 阅读(189) 评论(0) 推荐(0) 编辑

Working with large data sets in MySQL

摘要: What does working with large data sets in mySQL teach you ? Of course you have to learn a lot about query optimization, art of building summary tables and tricks of executing queries exactly as you want. I already wrote about development and configuration side of the problem so I will not go to deta 阅读全文

posted @ 2014-03-17 00:12 Still water run deep 阅读(251) 评论(0) 推荐(0) 编辑

Why MySQL could be slow with large tables ?

摘要: If you’ve been reading enough database related forums, mailing lists or blogs you probably heard complains about MySQL being unable to handle more than 1.000.000 (or select any other number) rows by some of the users. On other hand it is well known with customers like Google, Yahoo, LiveJournal,Tech 阅读全文

posted @ 2014-03-17 00:09 Still water run deep 阅读(384) 评论(0) 推荐(0) 编辑

导航