首先这个设计到B-tree索引的一些知识,
每个叶子block之间有相互的关连 ,请参照concept文档介绍。
1. 先简述下区别:
index fast full scan 是无序,多块的读取; 产生 db file scattered reads 事件.
index full scan 是有序(按照index之后的顺序),单个的读取 ,产生 db file sequential reads事件.
count(*)操作几乎总是选择index fast full scan,而索引列上的order by子句几乎总是选择index full scan
index fast full scan通过牺牲内存与临时表空间换取性能,因此在内存不足或饱和状态应进行合理权衡
具体例子分析 可以参照
http://blog.csdn.net/leshami/article/details/7452310
2. index skip scan:
select * from A where A.b='"test". 假设A表有个索引是建立在 (a,b) 列上的,但是a列的可能值的种类很少,而b列不同的值很多,这个时候就用 skip scan.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28826508/viewspace-1393131/
,如需转载,请注明出处,否则将追究法律责任。