18.3 Index Use Ratio

 < Day Day Up > 



This is a simple ratio trying to assess the percentage of index usage as compared to table scans. This value is not precise. These are the statistics I am interested in.

SELECT value, name FROM V$SYSSTAT WHERE name IN       ('table fetch by rowid', 'table scans           (short tables)', 'table scans (long tables)') OR name LIKE 'index fast full%' OR name = 'index fetch by    key';    VALUE    NAME    -----    ---------------------------------------------       75    table scans (short tables)      116    table scans (long tables)     3983    table fetch by rowid        0    index fast full scans (full)        0    index fast full scans (rowid ranges)        0    index fast full scans (direct read)     2770    index fetch by key

This query gives an idea of index usage percentages.

SELECT 'Index to Table Ratio ' "Ratio" , ROUND( (SELECT SUM(value) FROM V$SYSSTAT       WHERE name LIKE 'index fast full%'       OR name = 'index fetch by key'       OR name = 'table fetch by rowid') / (SELECT SUM(value) FROM V$SYSSTAT WHERE     name IN       ('table scans (short tables)', 'table scans (long           tables)') ),0)||':1' "Result" FROM DUAL;

This is the result. This number may or may not be good depending on applications. However, my highly active processing generally uses only Referential Integrity indexing, whose index hits may not be recorded. As a result this ratio could be very misleading. This is another example of a ratio which is not necessarily very useful.

Ratio                   Result ----------------------  ------ Index to Table Ratio      30:1



 < Day Day Up > 



Oracle High Performance Tuning for 9i and 10g
Oracle High Performance Tuning for 9i and 10g
ISBN: 1555583059
EAN: 2147483647
Year: 2003
Pages: 164

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net