Tuning Import
Tuning Import
PURPOSE
There is very little consolidated information on how to speed up
import when it is unbearably slow. Obviously import will take
whatever time it needs to complete, but there are some things
that can be done to shorten the time it will take.
RELATED DOCUMENTS
PR:1012699.102 -- Check SQL*Net Tracing
The Oracle Import process can sometimes take many hours or even days to
complete successfully. Unfortunately, many imports are needed to
perform crash recovery on databases that, for one reason or another, are
not functional. This makes the time needed for the import even more
critical. There are not many ways to speed up a large import, but here
are a few basic changes that can reduce the overall time of import.
- Create and use one large rollback segment, take all other rollback
segments offline. One rollback segment approximately 50% of the size
of the largest table being imported should be large enough. Import
basically does 'insert into tabX values (',,,,,,,')' for every row in
your database, so the rollback generated for insert statements is only
the rowid for each row inserted. Also create the rollback with the
minimum 2 extents of equal size.
For more info on enabling and disabling archive logging see Note:69739.1
- As with the rollback segment, create several large redo log files, the
larger the better. The larger the log files, the fewer log switches that
are needed. Check the alert log for messages like
'Thread 1 cannot allocate new log, sequence 17, Checkpoint not complete'.
This indicates the log files need to be bigger or you need more of them.
- If possible, make sure that rollback, table data, and redo log files
are all on separate disks. This increases throughput by reducing
I/O contention.
- Increase SORT_AREA_SIZE. Indexes are not being built yet, but any
unique or primary key constraints will be. The increase depends on what
other activity is on the machine and how much free memory is available.
Try 5-10 times the normal setting. If the machine starts swapping and
paging, you have set it too high.
- Use COMMIT=N. This will cause import to commit after each object (table),
not after each buffer. This is why one large rollback segment is needed.
- Use a large BUFFER size. This value also depends on system activity,
1 de 2 17/02/2011 13:01
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&...
- Consider using INDEXES=N during import. The user defined indexes will be
created after the table has been created and populated, but if the primary
objective of the import is to get the data in there as fast as possible,
then importing with INDEXES=N will help. The indexes can then be created
at a later date when time is not a factor.
If this approach is chosen, then you will need to use INDEXFILE option
to extract the DLL for the index creation or to re-run the import with
INDEXES=Y and ROWS=N.
For more info on extracting the DLL from an export file see Note:29765.1
select bytes
from dba_free_space
where tablespace_name = 'MAILINDX'
order by bytes desc;
select bytes
from dba_free_space
where tablespace_name = 'MAILINDX'
order by bytes desc;
Importing a table with a LONG column may cause a higher rate of I/O and disk
utilization than importing a table without a LONG column.
There are no parameters available within IMP to help optimize the import of these
data types.
Related
Products
Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition
Keywords
IMPORT UTILITY
Back to top
2 de 2 17/02/2011 13:01