W
W1979
Unregistered / Unconfirmed
GUEST, unregistred user!
該視圖用于檢視sql敘述的執行計划,請解釋一下最后兩句是什么意思(就是那個
START WITH 和 CONNECT BY)﹐我找過
Oracle的文檔沒有﹐但這句話確實可以跑
create or replace view plan_test as
select id,parent_id,lpad(' ',2*(level-1))||operation||' '
||options||' '||object_name
||' '||decode(id,0,'Cost='
||TO_CHAR(position)) "query plan"
from plan_table
--from here
start with id=0 and statement_id='Sal_Emp'
connect by prior id=parent_id and statement_id='Sal_Emp'
--end here
START WITH 和 CONNECT BY)﹐我找過
Oracle的文檔沒有﹐但這句話確實可以跑
create or replace view plan_test as
select id,parent_id,lpad(' ',2*(level-1))||operation||' '
||options||' '||object_name
||' '||decode(id,0,'Cost='
||TO_CHAR(position)) "query plan"
from plan_table
--from here
start with id=0 and statement_id='Sal_Emp'
connect by prior id=parent_id and statement_id='Sal_Emp'
--end here