可以過程v$sql_plan和v$sqltext聯合,獲得這些查詢的SQL語句,查找全表掃描的SQL語句可以參考如下語句:
SQL> select sql_text from v$sqltext t,v$sql_plan p where t.hash_value = p.hash_value and p.operation = 'TABLE ACCESS' and p.options = 'FULL' order by p.hash_value,t.piece;
查找Fast Full Index掃描的SQL語句可以參考如下語句:
SQL> select sql_text from v$sqltext t, v$sql_plan p where t.hash_value = p.hash_value and p.operation = 'INDEX' and p.options = 'FULL SCAN' order by p.hash_value, t.piece;
這些資訊對於發現資料庫問題,優化資料庫性能具有極強的指導意義。