process causing wait events

In awr report we have several wait events.
How we can find out which process /query causing the problem? Is there a query or process. I can see this.
Who is Participating?

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

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.

Gerwin Jansen, EE MVETopic Advisor Commented:
There is the V$SESSION_WAIT system view that displays the events for which sessions have just completed waiting or are currently waiting. It has the SID that you can lookup in V$SESSION.


sakthikumarAuthor Commented:
This gives details of waits, but I just want to know for which query how much waits, can i get this?
Gerwin Jansen, EE MVETopic Advisor Commented:
Your awr report should give you that info, can you post the part of the report where you see the wait events?
Need More Insight Into What’s Killing Your Network

Flow data analysis from SolarWinds NetFlow Traffic Analyzer (NTA), along with Network Performance Monitor (NPM), can give you deeper visibility into your network’s traffic.

sakthikumarAuthor Commented:
I want something like, wait events proportion to each query fired. Can I get that?
Gerwin Jansen, EE MVETopic Advisor Commented:
That I wouldn't know. You can request attention using the button above if you like.
slightwv (䄆 Netminder) Commented:
I don't know how to get what you want either.  I've never had to dig into any SQL that deep before.  If you have to tune at the low level wait events and given what a high-end DBA/tuning Expert costs, you could save money by adding hardware!

The deepest level I know about is to  trace the SQL and run tkprof on the output.

If you are licensed for it ADDM and AWR will allow you to drill down pretty deep but not sure if it is to the level you are asking about.

I would open an SR with Oracle Support to see if what you want is possible.
Only wait is for disk IO to complete. It is part of normal DB operation.
slightwv (䄆 Netminder) Commented:
>>Only wait is for disk IO to complete.

Incorrect.  There are many.

Please review:

If I run that query against my 11gR2 database I get 1,140 rows returned.  Your systems may vary.
Devinder Singh VirdiLead Oracle DBA TeamCommented:
You can use DBA_HIST_ACTIVE_SESSION_HIST and DBA_HIST_SQLSTAT to find which query is causing more wait event.

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
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.