[ORACLE] 대랑 Delete 작업시..Direct Loading
·
Database
Delete -> Insert 1. commit; alter session enable parallel dml; alter session set sort_area_size = 1000000; 2. create table temp_table storage(initial 50m) -- 충분한 extent 할당으로 동적 exent 할당 예방 tablespace another_disk_ts -- 서로 다른 디스크에 저장하여 I/O 분산 nologging -- log양을 최소화시킴 as select * from the_table where 1=2; -- table 정의만 생성 3. insert /*+ parallel(temp_table, 4) */ -- 병렬 direct path loading into temp_..
[ORACLE] Direct loading(오라클퍼포먼스튜닝)
·
Database
대용량 Insert시 집에가고싶을때.. Insert into or Insert into ... Select ...(X) insert /*+ append */ into emp nologging select * from emp; (O) insert /*+ PARALLEL(emp, 4) */ into emp nologging select * from emp; (O) 장점 1. Memory 안씀 2. HWM Bumpup 안씀 3. Undo 안씀 Undo에는 각 user들의 transaction의 내용들이 기록(블록 위치) 4. Log ahead 안씀(옵션) 5. 1분당 2GB처리