select *from
(select sa.SQL_TEXT,
sa.EXECUTIONS "执行次数",
round(sa.ELAPSED_TIME / 1000000, 2) "总执行时间",
round(sa.ELAPSED_TIME / 1000000 / sa.EXECUTIONS, 2) "平均执行时间"
from v$sqlarea sa
left join all_users u
on sa.PARSING_USER_ID = u.user_id
where sa.EXECUTIONS > 0 and u.username = 'XIR_TRD' and command_type = 3 --(2\7\6\3 增删改查)
order by (sa.ELAPSED_TIME / sa.EXECUTIONS) desc)
where rownum <= 100;