find out index the table is using

Dear all,

Any way to find out all indexes of the Oracle tables so as to find out any index which is no use any more and therefore the candidates index to drop ?
LVL 1
marrowyungSenior Technical architecture (Data)Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
if you drop a table, all it's related indexes will be dropped also.
apart from that, you can check the USER_INDEXES, ALL_INDEXES or DBA_INDEXES to see the indexes on which table they are.
0
MikeOM_DBACommented:
You need to set monitoring:
ALTER INDEX {index name}  MONITORING USAGE;

Open in new window

And then query v$object_usage
:p
0
marrowyungSenior Technical architecture (Data)Author Commented:
you mean

ALTER INDEX {index name}  MONITORING USAGE; 

Open in new window


is to monitor if the index still using ?

"And then query v$object_usage"

select * from v$object_usage where what ?
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

MikeOM_DBACommented:
1) Connect as user schema owner of the index and execute the 'ALTER,,MONITORING' command.
2) And yes, monitoring on index(es) will start monitoring if index is being used.
3) To check if index has been used, select * from v$object_usage where . . . . . .
SQL> desc  v$object_usage
 Name                    Null?    Type
 ----------------------- -------- ----------------
 INDEX_NAME              NOT NULL VARCHAR2(30)
 TABLE_NAME              NOT NULL VARCHAR2(30)
 MONITORING                       VARCHAR2(3)
 USED                             VARCHAR2(3)
 START_MONITORING                 VARCHAR2(19)
 END_MONITORING                   VARCHAR2(19)

Open in new window

idx-not-used.sql
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Geert GOracle dbaCommented:
be careful with dropping indexes like that
certain queries are only used in year-end calculations
0
marrowyungSenior Technical architecture (Data)Author Commented:
"certain queries are only used in year-end calculations "

but not the index. should be all right? or what are you concerning about ?

from your result (screenshot) what it tells ?
0
MikeOM_DBACommented:
What Geert means is to be careful which indexes you drop because they could be used only once a year in year-end calculations.

That is one of the reasons I include in my scripts the "age" of the index, in order to verify that "recently" created indexes are being used.

Good Luck!
0
marrowyungSenior Technical architecture (Data)Author Commented:
" they could be used only once a year in year-end calculations."

so if I drop that the year-end calculation will be very slow  ?

I will consult the developer what it use before dropping it.
0
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>so if I drop that the year-end calculation will be very slow  ?
exactly.
0
marrowyungSenior Technical architecture (Data)Author Commented:
but just only at that time, I can say server is busying! ahaha
0
marrowyungSenior Technical architecture (Data)Author Commented:
ok, I may re active it if I need
0
marrowyungSenior Technical architecture (Data)Author Commented:
ok,yeah, might come back and re active it if I need.
0
marrowyungSenior Technical architecture (Data)Author Commented:
one thing, how can I find out the pass question, it seems the old EE  is better on this!
0
Steve WalesSenior Database AdministratorCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.