ORACLE如何查看執(zhí)行時(shí)間較長(zhǎng)較慢的語(yǔ)句?
運(yùn)行慢的sql:
select * from (select sa.SQL_TEXT, sa.SQL_FULLTEXT, sa.EXECUTIONS "執(zhí)行次數(shù)", round(sa.ELAPSED_TIME / 1000000, 2) "總執(zhí)行時(shí)間", round(sa.ELAPSED_TIME / 1000000 / sa.EXECUTIONS, 2) "平均執(zhí)行時(shí)間", sa.COMMAND_TYPE, sa.PARSING_USER_ID "用戶ID", u.username "用戶名", sa.HASH_VALUE from v$sqlarea sa left join all_users u on sa.PARSING_USER_ID = u.user_id where sa.EXECUTIONS > 0 order by (sa.ELAPSED_TIME / sa.EXECUTIONS) desc) where rownum <= 50;