Oracle 12c新特性之——TABLE ACCESS BY INDEX ROWID BATCHED
2018-02-05 11:10
555 查看
Oracle12c开始,我们在获取SQL语句的执行计划时,也会经常看到"TABLE ACCESS BY INDEX ROWID BATCHED"操作,那么,这个操作到底是什么意思呢?有什么作用呢?下面我们先看看有关该操作的官方解释:
The BATCHED access shown in Step 1 means that the database retrieves a few rowids from the index, and then attempts to access rows in block order to improve the clustering and reduce the number of times that the database must access a block.
这句话的意思是说,该操作是数据库为了从索引中获取一些rowid,接着,试着按照块顺序存取块中的数据行,以便用来改善聚集效果和减少对一个数据块存取的次数。
官方解释的意思就是这样,但怎么理解呢?之前,当我们通过索引获取的rowid回表获取相应数据行时,都是读一个rowid回表获取一次相应数据行,然后,再读一个rowid,再回表获取一次相应数据行。。。,这样一直读取完所有所需数据。当不同rowid对应的数据行存储在一个数据块中时,就可能会发生对同一表数据块的多次读取,当一个索引的聚集因子比较低时,这也是一个必然结果,从而浪费了系统资源。Oracle 12c中该新特性,通过对rowid对应的数据块号进行排序,然后回表读取相应数据行,从而避免了对同一表数据块的多次重复读取,从而改善了SQL语句的性能,降低了资源消耗。该特性通过隐藏参数“_optimizer_batch_table_access_by_rowid”控制,默认值为true,即为开启。
The BATCHED access shown in Step 1 means that the database retrieves a few rowids from the index, and then attempts to access rows in block order to improve the clustering and reduce the number of times that the database must access a block.
这句话的意思是说,该操作是数据库为了从索引中获取一些rowid,接着,试着按照块顺序存取块中的数据行,以便用来改善聚集效果和减少对一个数据块存取的次数。
官方解释的意思就是这样,但怎么理解呢?之前,当我们通过索引获取的rowid回表获取相应数据行时,都是读一个rowid回表获取一次相应数据行,然后,再读一个rowid,再回表获取一次相应数据行。。。,这样一直读取完所有所需数据。当不同rowid对应的数据行存储在一个数据块中时,就可能会发生对同一表数据块的多次读取,当一个索引的聚集因子比较低时,这也是一个必然结果,从而浪费了系统资源。Oracle 12c中该新特性,通过对rowid对应的数据块号进行排序,然后回表读取相应数据行,从而避免了对同一表数据块的多次重复读取,从而改善了SQL语句的性能,降低了资源消耗。该特性通过隐藏参数“_optimizer_batch_table_access_by_rowid”控制,默认值为true,即为开启。
相关文章推荐
- oracle TABLE ACCESS BY INDEX ROWID 你不知道的索引回表-开发系列(三)
- oracle TABLE ACCESS BY INDEX ROWID 你不知道的索引回表-开发系列(三)
- table access by index rowid
- TABLE ACCESS BY INDEX ROWID前面的星号
- oracle常用的复合数据类型 : BULK COLLECT和is table of table_name%rowtype index by
- Oracle 12c 新特性之 table recovery from rman backups
- Oracle index by table(Associative array) used in PostgreSQL
- oracle常用的复合数据类型 : BULK COLLECT(成批聚合类型)和数组集合type类型is table of 表%rowtype index by binary_integer
- Oracle Table Access, Index & Join
- 表访问方式---->通过ROWID访问表(table access by ROWID)
- oracle常用的复合数据类型 : BULK COLLECT(成批聚合类型)和数组集合type类型is table of 表%rowtype index by binary_integer
- oracle常用的复合数据类型 : BULK COLLECT(成批聚合类型)和数组集合type类型is table of 表%rowtype index by binary_integer
- Oracle 12C 新特性之在线move (非分区表)table
- 表访问方式---->通过ROWID访问表(table access by ROWID)
- Oracle 12C 新特性之 恢复表
- Oracle只读权限(12c新特性)
- IMP-00058: ORACLE error 30036 encountered ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS1'
- Asktom Oracle: Partition table and index .
- Oracle 12c新特性
- Oracle 12c 新特性之 Multitenant Architecture (三)