Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a query which takes indefinite time, taking almost 60% of CPU time for 3 hours then simply hangs the PLSQL process. What I do is:

  1. Get "explain plan" for the query
  2. I noticed a "table scan" in the "explain plan" graph
  3. I added an index for the specific column
  4. I refreshed statistics for this table

I now get "explain plan" but the figures are the same and no execution optimization.

Any ideas?

share|improve this question

closed as not a real question by JNK Mar 12 '13 at 13:20

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

An idea: show us your query and plan and table and index definitions. – dezso Jul 12 '12 at 11:54

The optimizer may still look at the table scan to be a good idea. To insure the optimizer uses the index, have you tried adding a hint to your query to insure the optimizer uses the index? And echoing the earlier response, more information to work with would be nice.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.