Oracle???ж????м????SQL???
???????????? ???????[ 2016/3/18 15:23:03 ] ????????????? SQL
??????SQL????????????????????ЩSQL???ж????м????Multiple Executions Plans for the same SQL statement???????????SQL?ж????м???????ζ?????????????Щ??????????磬SQL?????e?????????????????????????????????????SQL????????м????
????--????????????ж????м????SQL????SQL_ID
????SELECT SQL_ID?? COUNT(1) AS PLAN_NUM
????FROM V$SQL
????GROUP BY SQL_ID
????HAVING COUNT(1) >=2
????ORDER BY 2 DESC ;
????--????????SQL_ID???????SQL???
????SELECT * FROM V$SQL
????WHERE SQL_ID=:SQL_ID;
???????????????SQL????????SQL????????м????????м????????????????м???????
????--???SQL??????м??
????SELECT * FROM TABLE(SYS.DBMS_XPLAN.DISPLAY_CURSOR('9x4fggs2mzu0m'??null))
????--???SQL??CHILD NUMBER?0????м??
????SELECT * FROM TABLE(SYS.DBMS_XPLAN.DISPLAY_CURSOR('9x4fggs2mzu0m'??0))
????--???SQL??CHILD NUMBER?1????м??
????SELECT * FROM TABLE(SYS.DBMS_XPLAN.DISPLAY_CURSOR('9x4fggs2mzu0m'??1))