728x90
오라클 파티션 local 인덱스 생성
인덱스 조회
select * from user_indexes
where table_name = 'TAB_WG01' ;
파티션 인덱스 조회
select * from user_part_indexes
where table_name = 'TAB_WG01' ;
파티션 LOCAL 인덱스 생성(nologging, parallel 8로 생성)
- nologging : 인덱스 생성시 LOG를 생성하지 않음, 인덱스 생성 속도를 빠를게 함
- 인덱스 생성 후 parallel 1로 변환하지 않으면 해당 index를 사용하는 쿼리가 parallel로 수행되어
시스템 부하 발생
create index IDX_WG01_1 on TAB_WG01 (STYLE_NO , PART_NO_TO , SLIP_DATE)
LOCAL tablespace ERP_INDEX nologging parallel 8;
create index IDX_WG01_2 on TAB_WG01 (PART_NO_TO , COLOR_CODE , SIZE_CODE)
LOCAL tablespace ERP_INDEX nologging parallel 8;
인덱스 생성 후에 logging 모드로 변환 및 parallel 1로 변경 해야함(필수!!!)
alter index IDX_WG01_1 logging;
alter index IDX_WG01_1 parallel 1;
728x90