📜  优化 sql 查询 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:59.134000             🧑  作者: Mango

代码示例1
-- 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'));