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: SQL Loader

RE: SQL Loader

From: April Wells <awells_at_csedge.com>
Date: Tue, 03 Jun 2003 05:01:37 -0800
Message-ID: <F001.005A8BAC.20030603050137@fatcity.com>

If SQL loader loads a table it takes the first record in the file and stuffs it in the top of the table... like a stack... last in, first out.... so if you were to read the table like you read the sequential file, it is in there with the "bottom" record in the file as the "top" row in the table...so SQL loader is, in effect, "going" from the first record in the file, it just pushes it on the stack... and when you are reading you are popping it off (although leaving it physically in place where a stack would pop it off and then discard it). I haven't really played a lot with external tables, but I would imagine that Kirti's explanation is quite logical. It takes the first block of records in the external table, and inserts it as the first (or next if you are appending it) block in the "regular" table... so it appears to be in the "correct" order. I guess that, in a sense then, that external tables are more of a queue type structure... filling up top to bottom...

ajw

April Wells
Oracle DBA/Oracle Apps DBA
Corporate Systems
Amarillo Texas

You will recognize your own path when you come upon it, because you will suddenly have all the energy and imagination you will ever need. ~ Jerry Gillies ~

-----Original Message-----
Sent: Tuesday, June 03, 2003 6:00 AM
To: Multiple recipients of list ORACLE-L

When I queried the table to which SQL Loader loaded data from the .dat file, the first record in the table was the 50000th record and 49999,49998...........  

                    Kirtikumar Deshpande

                    <kirtikumar_deshpande@        To:     Multiple
recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>       
                    yahoo.com>                    cc:

                    Sent by:                      Subject:     Re: SQL
Loader                                               
                    root_at_fatcity.com

 

 

                    06/02/03 11:02 PM

                    Please respond to

                    ORACLE-L

 

 





I think the query is displaying data from the table in the order in which rows were inserted by SQL*Loader.
Whereas, the query to read the same data from the external table is reading the file from the first physical record. So it appears reversed..

Stephen Andert <stephenandert_at_firsthealth.com> wrote:  Pradeep,

 I don't know what you mean when you say SQL*Loader is "starting from  the 50,000th record and going up". If there are 50k records, are you  saying it is not loading them? Or is it reading them from 50,000 then  49,999 (i.e. in revers order)? How are you determining what order  they
 are being read?

 Regarding external tables, the way they work is by reading the file  from the first block to either the end or till it finds what it  needs.
 Thus, external tables will read in the order the records are in the  file.

 I stand ready for my ramblings to be corrected by anyone who can  explain better :)

 Stephen

>>> pradeep_at_ibsplc.com 06/01/03 10:35PM >>>

 Dear All,

 I don't know whether SQL Loader behaves like this always or for me  only. I am loading a .dat file which has 50000 records.  I noticed that S! QL loader is starting from the 50,000th record and  going upwards, while external tables is starting from the 1st record  and going downwards.

 Could somebody help me confirming this?

 Regards,
 Pradeep

Do you Yahoo!?
Free online calendar with sync to Outlook(TM).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Pradeep Kumar G
  INET: pradeep_at_ibsplc.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).

The information contained in this communication, including attachments, is strictly 
confidential and for the intended use of the addressee only; it may also contain 
proprietary, price sensitive, or legally privileged information. Notice is hereby given that 
any disclosure, distribution, dissemination, use, or copying of the information by anyone 
other than the intended recipient is strictly prohibited and may be illegal. If you have 
received this communication in error, please notify the sender immediately by reply e-mail, 
delete this communication, and destroy all copies.
 

Corporate Systems, Inc. has taken reasonable precautions to ensure that any attachment to 
this e-mail has been swept for viruses. We specifically disclaim all liability and will 
accept no responsibility for any damage sustained as a result of software viruses and advise 
you to carry out your own virus checks before opening any attachment.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: April Wells
  INET: awells_at_csedge.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 Tue Jun 03 2003 - 08:01:37 CDT

Original text of this message

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