Oracle: Improve Import/ Export performance (imp / exp)

EXPORT:
    * Set the BUFFER parameter to a high value (e.g. 2M)
    * Set the RECORDLENGTH parameter to a high value (e.g. 64K)
    * Stop unnecessary applications to free-up resources for your job.
    * If you run multiple export sessions, ensure they write to different physical disks.
    * DO NOT export to an NFS mounted filesystem. It will take forever.

IMPORT:
    * Create an indexfile so that you can create indexes AFTER you have imported data. Do this by setting INDEXFILE to a filename and then import. No data will be imported but a file containing index definitions will be created. You must edit this file afterwards and supply the passwords for the schemas on all CONNECT statements.
    * Place the file to be imported on a separate physical disk from the oracle data files
    * Increase DB_CACHE_SIZE (DB_BLOCK_BUFFERS prior to 9i) considerably in the init$SID.ora file
    * Set the LOG_BUFFER to a big value and restart oracle.
    * Stop redo log archiving if it is running (ALTER DATABASE NOARCHIVELOG;)
    * Create a BIG tablespace with a BIG rollback segment inside. Set all other rollback segments offline (except the SYSTEM rollback segment of course). The rollback segment must be as big as your biggest table (I think?)
    * Use COMMIT=N in the import parameter file if you can afford it
    * Use ANALYZE=N in the import parameter file to avoid time consuming ANALYZE statements
    * Remember to run the indexfile previously created


Examples:
     exp userid=system/manager full=y direct=y recordlength=65535 file=exp_full.dmp log=exp_full.log
     imp userid=system/manager full=y recordlength=65535 file=exp_full.dmp log=imp_full.log


Monitoring import performance
select
   substr(sql_text,instr(sql_text,'into "'),30) table_name,
   rows_processed, round((sysdate-to_date(first_load_time,'yyyy-mm-dd hh24:mi:ss'))*24*60,1) minutes,
   trunc(rows_processed/((sysdate-to_date(first_load_time,'yyyy-mm-dd hh24:mi:ss'))*24*60)) rows_per_minute
from  
   sys.v_$sqlarea
where 
   sql_text like 'insert %into "%' and command_type = 2 and open_versions > 0;

Related Posts:
- Query optimization tips for Oracle
- How to Get Execution Plan and Statistics of Query
- DBMS_PROFILER: How to analyze pl/sql performance
- Oracle : TKPROF simple steps
- Why do I prefer COALESCE over NVL
- Append String to CLOB in Optimized way

23 comments:

  1. Thank you for the auspicious writeup. It actually used to be a leisure account it.

    Glance advanced to far added agreeable from you! By the way, how could we keep up a correspondence?

    ReplyDelete
  2. Usually I do not learn post on blogs, however I would like to say that this write-up
    very forced me to take a look at and do so!

    Your writing taste has been surprised me. Thank
    you, quite nice post.

    ReplyDelete
  3. Very energetic article, I enjoyed that a lot. Will there be a part 2?

    ReplyDelete
  4. HS code 0102 is Harmonized System Code of Live Bovine Animals. HS code makes your goods documentation easy. It passes the commodities faster through the customs with making the trade a lot smoother and time-saving affair.

    ReplyDelete
  5. Kenya HS Code 0207 is harmonized system code of meat and edible offal of the poultry heading 0105, fresh, chilled or frozen. Now its easy to import shipment data of kenya with customs shipment details as importer name, value, quantity, unit, foreign country, etc.

    ReplyDelete
  6. HS code is short for Harmonized Commodity Description and Coding System. It's a list of numbers used by customs to classify a product. interested can check the given hs codes.

    hs code 0210|
    hs code 0303|
    hs code 0304|
    hs code 0305

    ReplyDelete
  7. The India website is one of the goodies in import and export data information. They provide the India import export data provides about the trade service and trading business information. It is the best way for great accuracy in business data information. The suppliers or exporters providing the Indian shipping data and information about the potential of importers or buyers. The import data contains the information of the mineral oil or fuel, organic chemical solution, and products. The export data contains information on cotton, clothes, iron, and steel, and computer and their parts.

    ReplyDelete
  8. เว็บคาสิโน ไม่ผ่านเอเย่นต์ คุณอาจกำลังมองหาเว็บไซต์คาสิโน PG ที่ไม่ต้องผ่านเอเย่นต์เพื่อความสะดวกสบายและความน่าเชื่อถือ แน่นอนที่เข้ามาช่วย! เราเสนอบริการคาสิโนออนไลน์ที่เป็นอันดับหนึ่งในโลก

    ReplyDelete