ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Index Full Scans和Index Fast Full Scans

Index Full Scans和Index Fast Full Scans

原创 Linux操作系统 作者:tolywang 时间:2007-04-17 00:00:00 0 删除 编辑
Full Scans
A full scan is available if a predicate references one of the columns in the index. The
predicate does not need to be an index driver. A full scan is also available when
there is no predicate, if both the following conditions are met:
n All of the columns in the table referenced in the query are included in the index.
n At least one of the index columns is not null.
A full scan can be used to eliminate a sort operation, because the data is ordered by
the index key. It reads the blocks singly.



Fast Full Index Scans
Fast full index scans are an alternative to a full table scan when the index contains
all the columns that are needed for the query, and at least one column in the index
key has the NOT NULL constraint. A fast full scan accesses the data in the index
itself, without accessing the table. It cannot be used to eliminate a sort operation,
because the data is not ordered by the index key. It reads the entire index using
multiblock reads, unlike a full index scan, and can be parallelized.
Fast full scan is available only with the CBO. You can specify it with the
initialization parameter OPTIMIZER_FEATURES_ENABLE or the INDEX_FFS hint.
Fast full index scans cannot be performed against bitmap indexes.
A fast full scan is faster than a normal full index scan in that it can use multiblock
I/O and can be parallelized just like a table scan.

=================================

index full scan需要先从root定位到第一个leaf block,然后按顺序一个一个读取所有的leaf block,所以index full scan可以用来避免某些sort操作,这个full scan的名字有点误导人,其实并不是所有的index block都被读取的,某些分支块是不会读到的

index fast full scan则读取index的所有block,包括branch block,并且是multiblock的读取方式,所以index fast full scan不能用来消除sort ;

ffs只能在cbo下使用,我想主要原因是并行的关系 .

=================================

1. 是避免排序,因为索引已经排序,不是读取索引的全部块。通过链接读取下一块。


2。Fast Full Index Scans,全部读取,包括根,叶等结点。
充分发挥多块读的特性。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-84583/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Oracle , MySQL, SAP IQ, SAP HANA, PostgreSQL, Tableau 技术讨论,希望在这里一起分享知识,讨论技术,畅谈人生 。

注册时间:2007-12-10

  • 博文量
    5595
  • 访问量
    14357477