Showing posts with label Script to find out the Top SQL statement in your database. Show all posts
Showing posts with label Script to find out the Top SQL statement in your database. Show all posts

Sunday, 12 June 2016

Script to find out the Top SQL statement in your database



SELECT b.username username, a.disk_reads phyreads, a.executions noexec,
a.disk_reads
/ DECODE (a.executions, 0, 1, a.executions) rds_ex_ratio,
a.command_type, a.sql_text sqlqry
FROM v$sqlarea a, dba_users b
WHERE a.parsing_user_id = b.user_id AND a.disk_reads > 10000
ORDER BY a.disk_reads DESC;

Add Data file

 ************************************************** Database status Tablespace Usage ASM Disk Group Usage(RAC) Backup Filesystem Usage Alert...