Question: I see some recommendations that the
value in for an IOT may indicate that the IOT may require
rebuilding. Is the value of pct_direct_access in
dba_indexes an important metric to monitor for rebuilding an
index-only tablespace?
Answer: As we know, an index-only table
(IOT) is a type of table where Oracle stored the non-index columns
in the index tree, rather than in a separate table segment. While
the key for an IOT is usually the table primary key, an IOT allows
the DBA to create other secondary indexes on the IOT just as if it
were a real table.
Internally, Oracle uses the value of pct_direct_access
to see how to access a table. Each index on an IOT contains a value
in dba_indexes pct_direct_access and Oracle uses
this data to determine whether he should use a ROWID fetch through
the IOT tree, or do a fetch against a secondary index on a column
value.
The value for pct_direct_access is not dynamic and
pct_direct_access is gathered as of the last time that the SMON
background process gathered I/O information.
Some experts suggest that when the value for
pct_direct_access gets sufficiently low, the index should be
rebuilt. Others periodically rebuild all indexes with fully
automated scripts during scheduled maintenance windows (evenings/
weekends/holidays) because an index rebuild is 100% safe when
executed properly.
For general tips on the threshold for index rebuilding, see
the latest
consensus on index rebuilding.
|
|
Get the Complete
Oracle SQL Tuning Information
The landmark book
"Advanced Oracle
SQL Tuning The Definitive Reference" is
filled with valuable information on Oracle SQL Tuning.
This book includes scripts and tools to hypercharge Oracle 11g
performance and you can
buy it
for 30% off directly from the publisher.
|