일단 해보자 싶어서 해봤더니 테이블이 생기네요.. 이러면 안될 거 같은데 ㅎㅎ
기왕 해본 거 실행계획이나 확인해봐야지 싶어서 확인해봤는데 안되네요 왜일까요?
plan tool -> option-options-general 가서 plan table명 디폴트값(orange.orange_plan_table)으로해서 생성했는데... orange.orange_plan_table가 존재하지 않는다는 에러가 뜹니다
혹시 모르니 에러내용도 함께 적겠습니다
plan table orange.orange_plan_table does not exist.
please execute 'orange configuration admin' and set plan table to 'orange.orange_plan_table' or create your private plan table
plan table can be created or specified on [general] page with menu [option] -> [optons...] in plan tool
죄송합니다 제 지식이 부족해서 설명도 제대로 못하고 있네요 부끄럽습니다 ㅠㅠ
http://withoutwing.tistory.com/46
위 주소에 나온 설명대로 했습니다 (오렌지)
Create table plan_table ~~ 의 내용은 직접 작성하지 않았습니다
해당 주소에 나온 'Plan Tool Option' 창에서 Create PLAN_TABLE 버튼을 누르니 해당 Create 쿼리문의 내용과 동일한 plan_table이 생성되더군요 그래서 지금 plan_table이 생성되어 있는 상태인데, 위에 적은 댓글의 에러가 뜨면서 실행 계획을 볼 수가 없습니다
그래서 계속 찾아보다가 찾아낸 방법이,
explain plan set statement_id = '[임의의아이디]' into plan_table for
[실행계획 확인해볼 쿼리내용]
--플랜 생성
select
trim(level)||'. '||lpad('', level-1)||operation||''||options||'on'||object_name "Query"
, cost "Cost", cardinality "Rows", bytes "Bytes", case level when 1 then 0 else position end "Pos"
from plan_table
Connect by prior id = parent_id
and prior statement_id = statement_id
start with id = 0
and statement_id = '[test]' order by id
--생성한 플랜 조회
delete from plan_table where statement_id = '[test]';
--기 실행된 플랜 삭제
입니다
이렇게해도 explain plan에서 보여지는 내용과 동일한 실행계획을 확인할 수 있는건가요?
이렇게해서 일단 실행계획 띄우고 그 내용으로 공부하는 중인데 제대로 나온건지 확신할 수가 없어서 걱정되네요