Queries: What is the difference between rebuild and coalesce
and UPDATE BLOCK REFERENCES in INDEX.
alter index supplier_pk rebuild; alter index supplier_pk coalesce; ALTER INDEX supplier_pk UPDATE BLOCK REFERENCES; Answer: REBUILD statement is used to reorganize or compact an existing index or to change its storage characteristics. The REBUILD statement uses the existing index as the source for the new index. As a result, the index will consume twice as much space during the rebuild process. COALESCE statement instructs Oracle to merge the
contents of index blocks where possible to free blocks for reuse. The index
structure itself is not affected.
Rebuild takes exclusive table locks, whereas a coalesce
is a purely online operation.
Coalesce simply shuffles index entries around within the
existing index segment.
Coalesce requires little or no extra space.
Note: The "update block references" clause applies to the secondary indexes on an index organized table (IOT). SUch indexes have a "block guess" as part of the key structure to allow Oracle to jump directly to the block in the IOT were the required row was when the secondary index was created. But since an IOT is an index structure, leaf block splits can occur in the IOT as new data arrives, and rows will gradually move to different blocks. The "update block references" clause tells Oracle to bring the block guesses in the secondary index up to date.
Have a Oracle Question
Oracle Books
Oracle Application
Oracle Home
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|