Re: What's quicker, table to table insert or extract and sqlload?
Date: 1996/02/11
Message-ID: <824079542snz_at_ahardy.demon.co.uk>#1/1
In article <4faib9$gg1_at_news2.aimnet.com> bfntd_at_aimnet.com "Tony Damon" writes:
> 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
Tony,
Thanks for the index reminder!
Andy
-- Andy Hardy (Internet: aph_at_ahardy.demon.co.uk, CIS: 100015,2603) PGP key available on request =============================================================== 3. If anything just cannot go wrong, it will anyway. (Murphy's Laws)Received on Sun Feb 11 1996 - 00:00:00 CET