Index Hit Retio [message #448938] |
Thu, 25 March 2010 22:39 |
|
rahulvb
Messages: 924 Registered: October 2009 Location: Somewhere Near Equator.
|
Senior Member |
|
|
How to calculat/Get Index hit ratio ?
Is follwing query is right to get same ?
SQL> SELECT namespace ,(100*gethitratio ) hit_ratio FROM v$librarycache;
NAMESPACE HIT_RATIO
--------------- ----------
SQL AREA 50.3694248
TABLE/PROCEDURE 99.9740047
BODY 99.1189027
TRIGGER 99.9983301
INDEX 97.1096594
CLUSTER 99.9637897
OBJECT 100
PIPE 100
JAVA SOURCE 100
JAVA RESOURCE 100
JAVA DATA 100
11 rows selected.
|
|
|
|
|
|
|
|
|
Re: Index Hit Retio [message #449033 is a reply to message #448938] |
Fri, 26 March 2010 05:57 |
|
rahulvb
Messages: 924 Registered: October 2009 Location: Somewhere Near Equator.
|
Senior Member |
|
|
Thanks You Michel.
Quote:
Define "index hit ratio".
Regards
Michel
BTW I presume , on this Forum if YOU dont know then that does not exists in Oracle and YES it is true to great extent.
I have used follwing Query.
col c1 heading 'Object|Name' format a30
col c2 heading 'Operation' format a15
col c3 heading 'Option' format a15
col c4 heading 'Index|Usage|Count' format 999,999
break on c1 skip 2
break on c2 skip 2
select
p.object_name c1,
p.operation c2,
p.options c3,
count(1) c4
from
dba_hist_sql_plan p,
dba_hist_sqlstat s
where
p.object_owner <> 'SYS'
and
p.operation like '%INDEX%'
and
p.sql_id = s.sql_id
group by
p.object_name,
p.operation,
p.options
order by
1,2,3;
|
|
|
Re: Index Hit Retio [message #449116 is a reply to message #449017] |
Fri, 26 March 2010 15:10 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
rahulvb wrote on Fri, 26 March 2010 02:49Number which show the index being used n times !!
OK, you have a number.
Please elaborate on how, when, where & why this number can & should be used.
|
|
|