Clustered and Secondary Indexessecondary index A type of InnoDBindexthat represents a subset of table columns. An InnoDB table can have zero, one, or... Read More
posted @ 2014-07-14 12:11 等风来。。 Views(320) Comments(0) Diggs(0)
14.5.13.4Insert Buffering Database applications often insert new rows in the ascending order of the primary key. In this case, due to the layoutof th... Read More
posted @ 2014-07-14 12:05 等风来。。 Views(182) Comments(0) Diggs(0)
什么是B-树 一。已排序文件的查找时间 对一个有N笔记录的已排序表进行二叉查找,可以在O(log2N)比较级完成。如果表有1,000,000笔记录,那么定位其中一笔记录,将在20 ( log21,000,000 = 19.931) 个比较级内完成。从磁盘上读取一笔记录,与之后的比较键值操作相比,在花 Read More
posted @ 2014-07-14 01:53 等风来。。 Views(969) Comments(0) Diggs(0)
1. 表结构 2. repeatable read 级别下演示 3. 日志分析 事务(1)内容是:需要获取的锁 事务(2)内容是:持有事务(1)需要的锁,以及事务(2)需要的锁 Read More
posted @ 2014-07-14 01:00 等风来。。 Views(412) Comments(0) Diggs(0)
在数据库中,对性能影响最大的包括数据库的锁策略、缓存策略、索引策略、存储策略、执行计划优化策略。 索引策略决定数据库快速定位数据的效率,存储策略决定数据持久化的效率。 一。索引注意事项 1.索引不存储null值。 更准确的说,单列索引不存储null值,复合索引不存储全为null的值。索引不能存储Nu Read More
posted @ 2014-07-14 00:34 等风来。。 Views(337) Comments(0) Diggs(0)
一。插入缓冲(insert buffer) 对于非聚集索引的插入和更新,不是每一次直接插入索引页中,而是首先判断插入的非聚集索引页是否在缓冲池中,如果在,则直接插入,否则, 先放入一个插入缓冲区中。好似欺骗数据库这个非聚集的索引已经插入到叶子节点了,然后再以一定的频率执行插入缓冲和非聚集索引页子节点 Read More
posted @ 2014-07-14 00:09 等风来。。 Views(1017) Comments(0) Diggs(0)
------------------------------------------------------------------------------------------------------------ --------------- 欢迎联系 x.guan.ling@gmail.com--------------- ------------------------------------------------------------------------------------------------------------