📅  最后修改于: 2022-03-11 15:04:59.134000             🧑  作者: Mango
-- ORACLE: get explain plan for a query
-- Without execution
EXPLAIN PLAN FOR select ...;
SELECT * FROM TABLE(dbms_xplan.display);
-- With execution
SELECT /*+ gather_plan_statistics */ ...;
SELECT * FROM TABLE(dbms_xplan.display_cursor(NULL,NULL,'ALLSTATS LAST'));