Statistics for queries – buffer / disk


select
sql_text,
child_number,
executions,
--      executions - &m_exe_ct          exe_delta,
buffer_gets,
--      buffer_gets - &m_buf_ct         buf_delta,
disk_reads,
--      disk_reads - &m_dsk_ct          dsk_delta,
rows_processed,
--      rows_processed - &m_row_ct      row_delta,
--      round((rows_processed - &m_row_ct) / nullif(executions - &m_exe_ct,0) )                   rows_per_exe,
round((rows_processed) / nullif(executions,0) )                   rows_per_exe,
--      round(       (buffer_gets - &m_buf_ct) /      nullif(executions - &m_exe_ct,0)     )                   bufs_per_exe,
round(       (buffer_gets) /      nullif(executions,0)     )                   bufs_per_exe,
--      round(       (disk_reads - &m_dsk_ct) /      nullif(executions - &m_exe_ct,0)    )                   dsks_per_exe
round(       (disk_reads ) /      nullif(executions ,0)    )                   dsks_per_exe
from
v$sql
where
--  sql_id = '6vba5y39vcq1f'   and
child_number = 0

order by
--buffer_gets desc
--disk_reads desc
executions desc

Leave a Reply

Your email address will not be published. Required fields are marked *