Database Tuning (MOSC)

MOSC Banner

Find out indexes that are not used at all in Oracle 10g R2 database.

edited Aug 20, 2012 10:13AM in Database Tuning (MOSC) 6 commentsAnswered
Hi Gurus,
I am running Enterprise Edition Oracle 10.2.0.4 Database on HP-UX PARISC.

My Objective is to find out indexes that were not used at all.    I surfed online forums and google and found the query.   Then I made some touchs to it, to bring to this final form:
==============================================================================================
select p.object_name, p.operation, p.options,  to_char(p.timestamp, 'MM/DD/YYYY HH24:MI'), count(1)
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
and object_name like 'table_name%'

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center