Select *
From (Select area.SQL_TEXT,
area.SQL_FULLTEXT,
area.EXECUTIONS 执行次数,
Round(area.ELAPSED_TIME / 1000000, 2) 总执行时间,
Round(area.ELAPSED_TIME / 1000000 / area.EXECUTIONS, 2) 平均执行时间,
area.COMMAND_TYPE,
area.PARSING_USER_ID 用户ID,
u.USERNAME 用户名,
area.HASH_VALUE,
area.FIRST_LOAD_TIME 第一次加载时间,
area.LAST_LOAD_TIME 最后一次加载时间
From v$sqlarea area
Left Join all_users u
On area.PARSING_USER_ID = u.USER_ID
Where area.EXECUTIONS > 0
And u.USERNAME = 'TEST' -- 数据库所在的schema
And area.LAST_LOAD_TIME > To_Date('2024-06-24', 'yyyy-mm-dd')
Order By (area.ELAPSED_TIME / area.EXECUTIONS) Desc)
Where RowNum <= 50;
oracle查询近期SQL执行时间
最新推荐文章于 2026-07-13 08:57:43 发布

1894

被折叠的 条评论
为什么被折叠?



