Script – Top SQL (Buffer Gets)
- Posted by Gavin Soorma
- On July 6, 2009
- 0 Comments
This script will list the top 5 SQL statements sorted by the most number of buffer gets or logical reads set serverout on size 1000000 declare top5 number; text1 varchar2(4000); x number; len1 number; Cursor c1 is select buffer_gets,substr(sql_text,1,4000) from v$sqlarea order by buffer_gets desc; begin dbms_output.put_line('Reads'||' '||' Text'); dbms_output.put_line ('-----'||' '||'---------------------------------------------------'); dbms_output.put_line(' '); open […]
Read More