May
11
Analyzing Wait Events in Oracle
May 11, 2008 | Leave a Comment
Pulled From SearchOracle.com
Question:
Explain plan shows everything is fine. But the query is still not performing well. What could be the issue and what are the steps to check?
Answer:
The next step is to determine where the query is spending its time waiting. For that, you’ll have to look at the query’s wait events.
This is a big topic, so I cannot go into detail here. But the basic idea is to start a trace in your session with wait events enabled, run the query, and then analyze the trace file. The TKPROF utility can help analyze the wait events. You may find that your query is spending a large amount of time performing sorting to disk. You may find that a slow disk unit is causing problems. There could be other causes too, each of which would be a guess at this point. The wait events will eliminate the guesswork.

