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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to REPLACE a unique field?

Re: How to REPLACE a unique field?

From: Ramon F Herrera <ramon_at_conexus.net>
Date: 12 Mar 2004 10:19:57 -0800
Message-ID: <c9bc36ff.0403121019.7728d7f7@posting.google.com>


Like I said, I am still kind of newbie.
Can you Mark -or anyone else- please provide more details or pointers to this "external table" approach?

Will I still have to use SQL*Loader to read the 15 million *.dat records from text into some preliminary table(?) and then do some sort of smart and efficient merge?

TIA, -Ramon

"Mark C. Stock" <mcstockX_at_Xenquery .com> wrote in message news:<QdCdnatM_8yaqNLdRVn-hQ_at_comcast.com>...
> "Daniel Morgan" <damorgan_at_x.washington.edu> wrote in message
> news:1078931381.540562_at_yasure...
> | Ramon F Herrera wrote:
> | > Daniel Morgan <damorgan_at_x.washington.edu> wrote in message
> | >
> | >>How much data are we talking about and in what version of Oracle?
> | >
> | >
> | > Oracle is 9iR2, soon to be moved to 10g.
> | >
> | > The input file.dat is 1.1 GB, containing 15 million records.
> | > However, after SQL*Loading the data, there are only
> | > 115,000 unique records, and each one of them is the FIRST
> | > that was seen by sqldr, which may be obsolete. I'd like to
> | > have every repeated record overwrite the previous one
> | > (they are loaded in chronological order) and in that way
> | > I will end up with the most up-to-date info about every
> | > employee.
> | >
> | > TIA,
> | >
> | > -Ramon
> |
> | Blow it all into a single table with no constraints using a direct
> | path load and then run a stored procedure to move it to its final
> | destination using the MERGE statement.
> |
> | --
> | Daniel Morgan
> | http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
> | http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
> | damorgan_at_x.washington.edu
> | (replace 'x' with a 'u' to reply)
> |
>
> how about accessing it as an external table, and use the 'PK' + a date or
> sequence column to just insert the 0.76% of the records that you really
> want, instead of performing 14,885,000 extra updates?
>
> ;-{ mcs
Received on Fri Mar 12 2004 - 12:19:57 CST

Original text of this message

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