Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Which sql do you use in order to find slow queries?

ronald_2017Apr 12 2020 — edited Apr 15 2020

Hi All,

What is your strategy in order to find slow queries in the database? Which sql queries do you use? For recent queries, the first thing come to mind v$sql view. The following query get the most average time queries.

select (elapsed_time/1000000)/decode(executions, 0, 1, executions), sql_text from v$sql order by 1 desc;

Thanks

This post has been answered by BEDE on Apr 13 2020
Jump to Answer
Comments
Post Details
Added on Apr 12 2020
21 comments
3,219 views