04 2014 档案

Fixing Poor MySQL Default Configuration Values
摘要:I've recently been accumulating some MySQL configuration variables that have defaults which have proven to be problematic in a high-volume production ... 阅读全文

posted @ 2014-04-29 00:53 Still water run deep 阅读(298) 评论(0) 推荐(0)

A quest for the full InnoDB status
摘要:When running InnoDB you are able to dig into the engine internals, look at various gauges and counters, see past deadlocks and the list of all open tr... 阅读全文

posted @ 2014-04-28 23:48 Still water run deep 阅读(240) 评论(0) 推荐(0)

MySQL : interactive_timeout v/s wait_timeout
摘要:Most of the database intensive applications are worring about the default values of these variables obviously. Developers used to inform me that they ... 阅读全文

posted @ 2014-04-28 23:22 Still water run deep 阅读(451) 评论(0) 推荐(0)

Mydumper & Myloader Documentation
摘要:Mydumper.org web site has been missing in action for a while now. I've uploaded a copy of the Mydumper documentation to this web site for easy referen... 阅读全文

posted @ 2014-04-28 22:26 Still water run deep 阅读(598) 评论(0) 推荐(0)

InnoDB Plugin文件格式(概述)
摘要:本文将介绍InnoDB Plugin数据表格式的基本概念。1. 配置参数innodb_file_format这是一个很容易混淆的概念。目前,在InnoDB Plugin(1.0.6)配置文件中innodb_file_format支持两种:Antelope/ˈæntɪləʊp/、Barracuda/ˌbærəˈkjuːdə/。他们分别是两种文件格式的代号,在未来版本中,InnoDB将继续延续这种代号机制,它们会是Antelope, Barracuda, Cheetah, Dragon, Elk, Fox等等。Antelope是Built-in-InnoDB(MySQL内置的I 阅读全文

posted @ 2014-04-11 21:27 Still water run deep 阅读(547) 评论(0) 推荐(0)

innodb_strict_mode
摘要:Wheninnodb_strict_modeisON,InnoDBreturns errors rather than warnings for certain conditions. The default value isOFF.Strict modehelps guard against ignored typos and syntax errors in SQL, or other unintended consequences of various combinations of operational modes and SQL statements. Wheninnodb_str 阅读全文

posted @ 2014-04-11 21:10 Still water run deep 阅读(1986) 评论(0) 推荐(0)

Comparison of B-Tree and Hash Indexes
摘要:Understanding the B-tree and hash data structures can help predict how different queries perform on different storage engines that use these data structures in their indexes, particularly for theMEMORYstorage engine that lets you choose B-tree or hash indexes.B-Tree Index CharacteristicsA B-tree ind 阅读全文

posted @ 2014-04-04 01:24 Still water run deep 阅读(253) 评论(0) 推荐(0)

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 阅读(572) 评论(0) 推荐(0)

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 阅读(271) 评论(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 阅读(923) 评论(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 阅读(1239) 评论(0) 推荐(0)

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

posted @ 2014-04-02 23:15 Still water run deep 阅读(443) 评论(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 阅读(645) 评论(0) 推荐(0)

导航