檢視oracle中未使用繫結變數的sql語句
阿新 • • 發佈:2018-12-14
資料庫版本:11.2.0.4
查詢語句:
with force_mathces as (select l.force_matching_signature mathces, max(l.sql_id || l.child_number) max_sql_child, dense_rank() over(order by count(*) desc) ranking,count(*) a from v$sql l where l.force_matching_signature <> 0 and l.parsing_schema_name <> 'SYS' group by l.force_matching_signature having count(*) > 10) select v.sql_id, v.sql_text, v.parsing_schema_name, fm.mathces, fm.ranking,v.force_matching_signature,fm.a from force_mathces fm, v$sql v where fm.max_sql_child = (v.sql_id || v.child_number) and fm.ranking <= 50 order by fm.ranking;