oracle怎么查语句消耗时常,Oracle 查找常见耗性能的语句
-- 最耗緩存
SELECT * FROM (
SELECT SQL_FULLTEXT sql,
buffer_gets, executions, buffer_gets/executions "Gets/Exec",
hash_value,address,LAST_ACTIVE_TIME
FROM V$SQLAREA
WHERE buffer_gets > 10000
ORDER BY buffer_gets DESC)
WHERE rownum <= 10 ;
-- 最多物理讀取
SELECT * FROM (
SELECT SQL_FULLTEXT sql,
disk_reads, executions, disk_reads/executions "Reads/Exec",
hash_value,address,LAST_ACTIVE_TIME
FROM V$SQLAREA
WHERE disk_reads > 1000
ORDER BY disk_reads DESC)
WHERE rownum <= 10 ;
-- 最多執行
SELECT * FROM (
SELECT substr(sql_text,1,40) sql,SQL_FULLTEXT,
executions, rows_processed, rows_processed/executions "Rows/Exec",
hash_value,address,LAST_ACTIVE_TIME
FROM V$SQLAREA
WHERE executions > 100
ORDER BY executions DESC)
WHERE rownum <= 10 ;
-- 最耗內存
SELECT * FROM (
SELECT substr(sql_text,1,40) sql,
sharable_mem, executions, hash_value,address,LAST_ACTIVE_TIME
FROM V$SQLAREA
WHERE sharable_mem > 1048576
ORDER BY sharable_mem DESC)
WHERE rownum <= 10 ;
總結
以上是生活随笔為你收集整理的oracle怎么查语句消耗时常,Oracle 查找常见耗性能的语句的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 逻辑回归预测事件发生的概率_通过逻辑回归
- 下一篇: appium java 点击事件_“按钮