OraQA

Oracle Question and Answer

  • Do you have a solution to a problem? Do you have an unanswered question? Login and share it with the Oracle community. More...

Oracle News


Entries RSS feed

Comments RSS feed

How to find the top SQL statements that have caused most block buffer reads?

January 16th, 2006 By kirtandesai

Select buffer_gets, sql_text
from v$sqlarea
where buffer_gets > 10000
order by buffer_gets desc;

I had to bump up the number of buffer_gets because the above statement returned a LOT of rows.

2 Responses to “How to find the top SQL statements that have caused most block buffer reads?”

  1. nlitchfield Says:

    How about this for a top 10.

    select sql_text,buffer_gets
    from(
    Select buffer_gets, sql_text, rownum rn
    from v$sqlarea
    where buffer_gets > 10000
    order by buffer_gets desc)
    where rn < 11
    
  2. kirtandesai Says:

    yep
    whatever fits your requirements!!!!!

Leave a Reply

You must be logged in to post a comment.

RSS feed for comments on this question