简体   繁体   English

重建索引组织表和普通表的索引有什么区别?

[英]What is the difference in rebuilding an index on index-organized table and an ordinary table?

From this article about index organized tables , 这篇关于索引组织表的文章

Note that rebuilding a secondary index on an index-organized table involves reading the base table, unlike rebuilding an index on an ordinary table. 请注意,在索引组织表上重建二级索引涉及读取基表,这与在普通表上重建索引不同。

Why does rebuilding of an index on an ordinary table not require reading the base table? 为什么在普通表上重建索引不需要读取基表?

Quote from http://download.oracle.com/docs/cd/E11882_01/server.112/e10595/indexes004.htm#ADMIN11734 引自http://download.oracle.com/docs/cd/E11882_01/server.112/e10595/indexes004.htm#ADMIN11734

When you rebuild an index, you use an existing index as the data source. 重建索引时,使用现有索引作为数据源。

I believe this is because the index is normally used to rebuild itself, and how physical rowid's are used in the index. 我相信这是因为索引通常用于重建自身,以及如何在索引中使用物理rowid。

An index on an ordinary table stores physical rowid's, but because an index-organized table is fluid in structure, a secondary index is only able to store a physical rowid guess. 普通表上的索引存储物理rowid,但由于索引组织表在结构上是流动的,因此辅助索引只能存储物理rowid猜测。

When you rebuild an index on an ordinary table, it doesn't need to reference the source table for physical rowid's, it has them already in the index. 当您在普通表上重建索引时,它不需要引用物理rowid的源表,它已经在索引中。 But on an index-organized table, the rebuild has to review the physical rowid's again and is thus forced to scan the base table. 但是在索引组织表上,重建必须再次检查物理rowid,因此必须扫描基表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM