脚本内容
-- 获取没有绑定变量的SQL列表
set lines 180
set pages 11111
set long 8888
col sql_text for a90
col cnt for 99999
col FORCE_MATCHING_SIGNATURE for 99999999999999999999999
col program for a10
select force_matching_signature,cnt,sql_id, program,(select sql_fulltext from v$sqlstats st where st.sql_id = no_bind.sql_id and rownum = 1) sql_text
from (
select force_matching_signature , count(*) cnt,max(sql_id) sql_id,max(substr(module,1,10)) program
from v$sql
where force_matching_signature > 0
group by force_matching_signature
having count(*) > &number_of_repeated
) no_bind
order by 2 desc
/
评论
贡献排行榜