Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: 10gR2 - direct path load with enabled indexes - lots of undo generated from indexes

RE: 10gR2 - direct path load with enabled indexes - lots of undo generated from indexes

From: Bobak, Mark <>
Date: Tue, 30 May 2006 16:29:24 -0400
Message-ID: <>


DML against an index always logs. It *must* log, cause you're modifying the index structure. Consider that it's impossible to update an index without updating the *existing* tree structure. Since the *existing* tree structure must be updated, it MUST be protected by redo. (Note that the preceding is not true for a heap table (no underlying index structure to maintain) or when rebuilding an index.)  

To make the load (nearly) completely nologging, try this: you mention you're starting with an empty table, so, truncate table load_it;
alter table load_it and disable the primary key. (This will drop the unique index, if an index was implicitly created on the table.) Create a non-unique index for the primary key. for each index on the table (including the new non-unique pk index) do:

   alter index index_name unusable;
Now, set: alter session set skip_unusable_indexes = true; Now, load that data:
insert /*+ append */ into load_it select * from other_schema.load_it; finally, for each index on the table, do:

   alter index index_name rebuild nologging; and last, alter table load_it and enable the primary key.  

That should get you a clean load free of (most) logging.  

Hope that helps,  


Mark J. Bobak 
Senior Oracle Architect 
ProQuest Information & Learning 

For a successful technology, reality must take precedence over public
relations, for Nature cannot be fooled.  --Richard P. Feynman, 1918-1988



[] On Behalf Of Arul Ramachandran
Sent: Tuesday, May 30, 2006 4:07 PM
Cc: oracle-l
Subject: Re: 10gR2 - direct path load with enabled indexes - lots of
undo generated from indexes

Hi Christo,
What Oracle version?
What is the top wait event?
Are you seeing high "log file sync" and "transaction rollback" in your
statspack report?

On 5/30/06, Christo Kutrovsky <> wrote: 

	Hello All,
	We're doing a direct path to an empty table via:
	insert /*+ APPEND*/ into TABLE as select * from
	The table has a primary key and a few extra indexes. The goal is
	perform the entire operation in nologging mode. The table and
	indexes are "nologging".
	The problem we have is that there's undo (rollback) generated
for the 
	indexes, which I dont understand. Why is there undo generated
for an
	index built, equivalent to the size of all indexes ? Is this
normal ?
	The process goes as follow

- start writing into table segment
- while writing, have 1 sort area for each index on the table,
and populate it with data been written
- At this point only 1 undo record is been used
- after the table load is complete, write up the index segments
(from sort area/temp tablespace) 1 by 1, creating as much undo as the size of the indexes. Any ideas? It doesn't make sense to use that much undo (rollback) ? When you do a normal index build you dont use that much undo. -- Christo Kutrovsky Senior Database/System Administrator The Pythian Group - I blog at -- -- Arul --
Received on Tue May 30 2006 - 15:29:24 CDT

Original text of this message