当前系统存在的解析数:
select a.name, value
from v$sysstat a, v$statname b
where a.STAT_ID = b.STAT_ID
and a.STATISTIC# = b.STATISTIC#
and b.NAME like 'parse%';
快速找出硬解析高的SQL
方法一:SQL> Select plan_hash_value, count(hash_value)
from v$sql
where plan_hash_value <> 0
group by plan_hash_value
having count(hash_value) > 10
order by 2 desc;
SQL> select sql_text
from v$sql
where plan_hash_value = 2701221155
and rownum < 2
方法二:
SQL> SELECT substr(sql_text, 1, 40) “SQL”,
count(*),
sum(executions) “TotExecs”
FROM v$sqlarea
WHERE executions < 5
GROUP BY substr(sql_text, 1, 40)
HAVING count(*) > 30
ORDER BY 2 desc
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26022000/viewspace-734305/
,如需转载,请注明出处,否则将追究法律责任。