Skip to content

Instantly share code, notes, and snippets.

@joseporiol
Created January 21, 2014 10:21
Show Gist options
  • Save joseporiol/8537587 to your computer and use it in GitHub Desktop.
Save joseporiol/8537587 to your computer and use it in GitHub Desktop.
Find Top 10 SQL by reads per execution
SELECT *
FROM ( SELECT ROWNUM,
SUBSTR (a.sql_text, 1, 200) sql_text,
TRUNC (
a.disk_reads / DECODE (a.executions, 0, 1, a.executions))
reads_per_execution,
a.buffer_gets,
a.disk_reads,
a.executions,
a.sorts,
a.address
FROM v$sqlarea a
ORDER BY 3 DESC)
WHERE ROWNUM < 10;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment