Take the 2-minute tour ×
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. It's 100% free, no registration required.

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
5  
An idea: show us your query and plan and table and index definitions. –  dezso Jul 12 '12 at 11:54
add comment

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.

1 Answer

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
add comment

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