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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: VLDB, Sequence and Sql*loader

RE: VLDB, Sequence and Sql*loader

From: Stephane Faroult <sfaroult_at_oriolecorp.com>
Date: Wed, 21 May 2003 03:31:40 -0800
Message-ID: <F001.0059EA4B.20030521033140@fatcity.com>


Out of the top of my head (may be out of date here and there) there is something in the SQL*Loader syntax allowing to enter something which looks like a sequence number but is indeed a glorified record counter, similar to what you can find with awk. If you want a 'true' sequence number, I *believe* that it then becomes a SQL expression, taboo with a direct load (fairly logical, since sequence numbers sit in the SGA which is bypassed by a direct load). However, the first trick should work. Nothing prevents you from creating a sequence afterwards, starting with the record count reported by sqlldr + 1. Forget about the post-load update. Likely to be long, may induce chaining if PCTFREE is too tight, and you lose the benefit of indexes built on the fly (what use is a sequence number if you don't index it?).

HTH SF

>----- ------- Original Message ------- -----
>From: "NGUYEN Philippe (Cetelem)"
><philippe.nguyen_at_cetelem.fr>
>To: Multiple recipients of list ORACLE-L
><ORACLE-L_at_fatcity.com>
>Sent: Wed, 21 May 2003 02:46:45
>
>Hi Gurus !
>What are the best practises for inserting rows with
>sql*loader and
>generating an id for each row (eg: flat file
>contains 3 column, and
>destination table contains 4 )
>
>- Is-it possible to generate sequence during the
>loading ? does it work with
>direct mode ?
>- Should we use sequence ? or is it better to
>update each row with a number
>afterwards?
>
>
>TIA
>Philippe
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriolecorp.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed May 21 2003 - 06:31:40 CDT

Original text of this message

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