oracle中查询最磁盘读的最多的SQL语句

it2025-08-26  1

select

       b.username username,a.dis_reads read,a.executions exec,

      a.disk_reads/decode(a.executions,0,1,a.executions) rds_exec_ratio,

      a.sql_text statement

from

      v$sqlarea a,dba_users b

where

      a.parsing_user_id = b.user_id and a.disk_reads > 100000

order by 

     a.disk_reads desc

 

disk_reads:显示系统中执行磁盘读的次数;

disk_reads/executions:得到SQL语句每次执行时访问磁盘最多的SQL语句。

最新回复(0)