Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: last time an index was used
Well, I was afraid that you will ask me that. Monitoring is the best way to do it.
There is a sys-owned table called "OBJECT_USAGE", which contains column OBJ#, which
can be joined with OBJECT_ID from dba_objects and there is column "FLAGS". If bitwise
and between FLAGS and 0xFFFF is non-zero, the object was used in the monitoring period.
Here is the function that oracle uses to define that view:
decode(bitand(i.flags, 65536), 0, 'NO', 'YES'), Of course, that is not officially sanctioned. Please, have mercy on me on 15/04.
On 04/02/2004 11:47:57 AM, Ruth Gramolini wrote:
> Mladan,
> Thanks for your speedy answer. However,I want to look at all the indexes in
> our production schema and see which ones are not used. Isn't there some sys
> table that records this? Isn't there another way, besides turning
> monitoring on?
-- Mladen Gogala Oracle DBA ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Fri Apr 02 2004 - 11:00:06 CST
![]() |
![]() |