Problem solve Get help with specific problems with your technologies, process and projects.

Finding out how frequently an index is used

Is it possible to find out how frequent an index is used?

Yes sure, you need to create a table called plan_table and use the EXPLAIN PLAN statement. This statement will fill the plan table with information about the index usage of a select statement. Read the manual for EXPLAIN PLAN to see exactly how its done.

User feedback: The question isn't 'Can I tell if an index is used for a particular query' ... the question is 'Can I tell how frequently an index is used'. In Oracle, I do not believe there is any way of knowing if an index is used or how frequently it is used...unless of course you want to analyze every SQL statement which you are aware of. In an ad-hoc environment in particular, you don't know if your indexes are helping.

Eli's response: There is no Oracle built-in solution for telling how frequently an index is used, but you can use the profiling utility to track all server activity and record it in a file or table and check afterwards how many times indexes were used.

For More Information

  • What do you think about this answer? E-mail the editors at editor@searchDatabase.com with your feedback.
  • The Best Oracle Web Links: tips, tutorials, scripts, and more.
  • Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
  • Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
  • Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.

This was last published in May 2002

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.