Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: how to rebuild index after direct path load?

Re: how to rebuild index after direct path load?

From: Jerry Gitomer <jgitomer_at_erols.com>
Date: Thu, 25 Nov 1999 00:29:49 -0500
Message-ID: <81ih9m$5ma$2@autumn.news.rcn.net>


Try this:

  1. Create new table with the same structure as your existing table.
  2. Direct path load into new table
  3. Create index on new table
  4. Delete from old table where in existing table
  5. Direct path load into existing table
  6. Truncate new table

You might also try doing an insert from new table into existing table for step 5, but I think the direct path load is faster.

hth
jerry gitomer

hkpang_at_my-deja.com wrote in message
<81hbld$6nu$1_at_nnrp1.deja.com>...
|Hi,
|
|I need to upload a huge dataset into an existing table. If the
dataset
|contains duplicate keys, I want to the delete the old ones
already in
|the table.
|
|My current approach is using sqlldr direct path. Since the data
|contains duplicate keys, the primary key index is violated and
put in
|direct load state afterward.
|
|Now my problem is how to rebuild the index *and* eliminate the
|duplicates?
|
|1) use a delete command to eliminate the duplicates. this kind
of works
|but the performance is unacceptable. i potentially have millions
to
|delete.
|
|2) drop the index before upload, reenable the index with
exceptions
|going to an exception table. the probelm is that both the old
rows and
|the new rows are in the table, there is no way I can figure out
which
|one to eliminate.
|
|Any suggestions???
|
|Many thanks for making a happy thanksgiving possible. :-)
|
|
|Sent via Deja.com http://www.deja.com/
|Before you buy.
Received on Wed Nov 24 1999 - 23:29:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US