10.07.2015 Views

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 4 STORAGE INDEXESMonitoring Storage IndexesThe ability to monitor Storage Indexes is very limited. The optimizer doesn’t know whether a StorageIndex will be used for a particular SQL statement. Nor do AWR or ASH capture any information aboutwhether Storage Indexes were used by particular SQL statements. There is a single statistic that tracksStorage Index usage at the database level and an undocumented tracing mechanism.Database StatisticsThere is only one database statistic related to storage indexes. The statistic, cell physical IO bytessaved by storage index, keeps track of the accumulated I/O that has been avoided by the use of StorageIndexes. This statistic is exposed in v$sesstat and v$sysstat and related views. It’s a strange statisticthat calculates a precise value for something it didn’t do. Nevertheless, it is the only easily accessibleindicator as to whether Storage Indexes have been used. Unfortunately, since the statistic is cumulative,like all statistics in v$sesstat, it must be checked before and after a given SQL statement in order todetermine whether Storage Indexes were used on that particular statement. Here is an example:SYS@EXDB1> set echo onSYS@EXDB1> @siSYS@EXDB1> col name for a70SYS@EXDB1> col value for 99999999999999SYS@EXDB1> select name, value2 from v$mystat s, v$statname n3 where n.statistic# = s.statistic#4 and name like '%storage%';NAMEVALUE--------------------------------------------- ---------------cell physical IO bytes saved by storage index 0SYS@EXDB1> select avg(pk_col) from kso.skew2 where col1 is null;AVG(PK_COL)-----------32000001SYS@EXDB1> set echo offSYS@EXDB1> @siNAMEVALUE--------------------------------------------- ---------------cell physical IO bytes saved by storage index 3984949248SYS@EXDB1> select avg(pk_col) from kso.skew2 where col1 is null;AVG(PK_COL)-----------32000001107

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!