Identifying Top SQL statements

Identifying Top SQL statements

 

  

Hi All,

How do I identify the worst performing sql statements?I use the following SQL to get the worst running statements.

select avg(disk_reads) a_d from v$sqlarea

select avg(buffer_gets) b_g from v$sqlarea

select avg(executions) e_x from v$sqlarea

select disk_reads, buffer_gets, EXECUTIONs, loads, ROWS_PROCESSED, Substr(sql_text,1,320) S_T from v$sqlarea where ((disk_reads > &avg_disk and buffer_gets > &buf_gets ) or (buffer_gets > &buf_gets ) or (executions > &exs)) and PARSING_SCHEMA_ID > 0

order by (disk_reads * 100) + buffer_gets desc

To interpret the wrst SQL statements do I look for more number of disk reads,more executions,less rows processed,or more buffer gets?

What factores are the most important in identifying the bad SQL?



TIA



Mike





---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Oracle LazyDBA home page