PLANテーブル整形用sql



SET VERIFY OFF

ACCEPT id CHAR PROMPT 'ID: '
SELECT LPAD(' ', 2*(level - 1)) || operation || ' ' || options
    || ' ' || object_name || ' ' || DECODE(id, 0, 'Cost=' || position)
    "Query Plan"
  FROM plan_table
START WITH id = 0
  AND statement_id = &id
CONNECT BY PRIOR id = parent_id
  AND statement_ID = &id

rem --- plan_tableの削除 ---
DELETE FROM plan_table WHERE statement_id = &id;
COMMIT;
/

2001/03/21 山野辺

[目次へ]