Re: What's quicker, table to table insert or extract and sqlload?

From: Tony Damon <bfntd_at_aimnet.com>
Date: 1996/02/07
Message-ID: <4faib9$gg1_at_news2.aimnet.com>#1/1


Richard Frazier (rfrazier_at_mailstorm.dot.gov) wrote:
: Yuk Hon Johnny Chan (jychan_at_corp.hp.com) wrote:
: : Andy Hardy (aph_at_ahardy.demon.co.uk) wrote:
: : : Hi,
 

: : : I've a 6 million row table that needs to be copied to another, to
: : : produce identical copies.
 

: : : I'm contemplating either performing a very large insert (will I have
: : : the rollback to support it!) or extracting the first table to a file
: : : for subsequent loading by sqlload.
 

: : : Any thoughts or suggestions?
:
:
: How about exporting the original table, then renaming the original to the
: duplicate. Then reimport the original. Presto! two identical tables.

Make sure there are no indexes (watch out for primary key constraints since they create an index) on the target table. Put the data in the table first, then create the indexes. The overhead of constantly reorganizing the index (b-tree?) while loading data is significant.

Tony Damon Received on Wed Feb 07 1996 - 00:00:00 CET

Original text of this message