Tip
: How do I put my object in NO-LOGGING Mode ?
Solution :-
create table as select
for example :-
create
table sam_test
tablespace samtablespace
storage (initial 1m next 1m pctincrease 0 maxextents unlimited)
NOLOGGING
as
select * from sam_test2;
For using NOLOGGING
option you have to consider Direct-load insert
We can do Direct load insert with serial mode,parallel mode or through
sql * loader
Serial
mode :- It requires append hint
otherwise data will not be loading through NO-LOGGING mode.
insert
/*+ APPEND
*/ into
sam_test nologging
values ('test1','test2');
Insert through subquery as
insert /*+ APPEND */ into sam_test(test1,test2)
select test1,test2
from sam_test2;
Parallel mode :- You do require
* Alter session enable/force parallel
dml
* Table parallel attribute or
statement parallel hint
for exp :-
Alter
session enable parallel dml;
Alter table sam_test nologging;
Alter table sam_test parallel(10);
insert into sam_test
select * from sam_test2;
Use of hint
alter table
sam_test nologging;
alter session enable parallel dml;
insert /*+
parallel (sam_test,12) */ into sam_test
select /*+ parallel(sam_test2,12) */ from sam_test2;
End of Tip
|
Welcome
to send comments or feedback at Wadhwa_s@Hotmail.com |
|
Sameer Wadhwa |
Copyright © Oracle Techniques All Rights Reserved
|