| ページ一覧 | ブログ | twitter |  書式 | 書式(表) |

MyMemoWiki

「Oracle EXPLAIN PLAN」の版間の差分

提供: MyMemoWiki
ナビゲーションに移動 検索に移動
9行目: 9行目:
 
   
 
   
 
   
 
   
  SELECT cardinality "[[R]]ows",
+
  SELECT cardinality "Rows",
 
  lpad(' ',level-1)||operation||' '||
 
  lpad(' ',level-1)||operation||' '||
 
  options||' '||object_name "Plan"
 
  options||' '||object_name "Plan"
  F[[R]]OM PLAN_TABLE
+
  FROM PLAN_TABLE
 
  CONNECT BY prior id = parent_id
 
  CONNECT BY prior id = parent_id
 
  AND prior statement_id = statement_id
 
  AND prior statement_id = statement_id
  STA[[R]]T WITH id = 0
+
  START WITH id = 0
 
  AND statement_id = 'plan_test'
 
  AND statement_id = 'plan_test'
  O[[R]]DE[[R]] BY id
+
  ORDER BY id
 
----
 
----
 
{{include_html [[banner_html]], "!Oracle"}}
 
{{include_html [[banner_html]], "!Oracle"}}

2022年5月19日 (木) 14:45時点における版

EXPLAIN PLAN

Oracle |

@$ORACLE_HOME/RDBMS/ADMIN/UTLXPLAN.SQL

truncate table plan_table;
explain plan set statement_id='plan_test' for
[SQL_Statement]


SELECT cardinality "Rows",
lpad(' ',level-1)||operation||' '||
options||' '||object_name "Plan"
FROM PLAN_TABLE
CONNECT BY prior id = parent_id
AND prior statement_id = statement_id
START WITH id = 0
AND statement_id = 'plan_test'
ORDER BY id

{{include_html banner_html, "!Oracle"}}