2014年4月4日

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 阅读(235) 评论(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 阅读(564) 评论(0) 推荐(0) 编辑

MySQL数据库如何进行排序(Sort)操作?

摘要: 参考原始文档后, 自已总结一下, 有不对的地方请指正. 在MySQL中进行排序有两种算法, 以4.1版本为分水岭, 在此之前排序时的数据只包括ORDER BY中的列和一个记录的指针(Sort A), 在4.1之后多了一种改进的方法, 排序的数据中可以包括SELECT中的列和ORDER BY中的列(Sort B) Sort A中最主要的坏处是需要进行二次扫表, 第一次是将ORDER BY的列及记录指针读到SORT Buffer中, 然后排序, 如果要排序的数据很多, 不能在内存中完成, 则可能会用到临时表(tmpdir)空间. 排完序后再根据记录指针将记录读取到READ RND Buffer.. 阅读全文

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

导航