Need faster data loading (using sql-loader)

i am trying to load approx. 230 million records (around 60-bytes per record) from a flat file into a single table. i have tried sql-loader (conventional load) and i'm seeing performance degrade as the file is being processed. i am avoiding direct path sql-loading because i need to maintain uniqueness using my primary key index during the load. so the degradation of the load performance doesn't shock me. the source data file contains duplicate records and may contain records that are duplicates of those that are already in the table (i am appending during sql-loader).
my other option is to unload the entire table to a flat file, concatenate the new file onto it, run it through a unique sort, and then direct-path load it.
has anyone had a similar experience? any cool solutions available that are quick?
thanks,
jeff

It would be faster to suck into a Oracle table, call it a temporary table and then make a final move into the final table.
This way you could direct load into an oracle table then you could
INSERT /*+ APPEND */ INTO Final_Table
    SELECT DISTINCT *
    FROM   Temp_Table
    ORDER BY ID;This would do a 'direct load' type move from your temp teable to the final table, which automatically merging the duplicate records;
So
1) Direct Load from SQL*Loader into temp table.
2) Place index (non-unique) on temp table column ID.
3) Direct load INSERT into the final table.
Step 2 may make this process faster or slower, only testing will tell.
Good Luck,
Eric Kamradt

Similar Messages

  • Data persistence using SQL/J

    Hi !
    I am trying to achieve data persistence using SQL/J.
    The env / tools that I am using are WLS 4.5.1
    Oracle 8i, SQL/J.
    SQL/J works fine with the two - tier applications but with WLS the connectivity is not been arrived at.
    Any help would be wewlcome.
    Thanks,
    Archana

    Are you using an Oracle JDBC driver in WLS or not?
    (1) If the answer is no, then you should replace:
    oracle.sqlj.runtime.Oracle.connect(<url>,<user>,<pwd>);
    (and similarly Oracle.getConnection())
    with:
    import sqlj.runtime.ref.DefaultContext;
    <load JDBC driver, if necessary>
    DefaultContext.setDefaultContext(new DefaultContext(<url>,<user>,<pwd>,false));
    (2) Actually, forget (1): in the middle tier you should never use a default context at all (every thread must have its own connection context):
    DefaultContext ctx = new DefaultContext(...);
    #sql [ctx] { ..SQL statement.. };
    (3) If you do not use an Oracle JDBC driver, then say in your sqlj command line:
    -profile=false
    (this omits Oracle customization and makes the .ser file smaller)
    Also, you only need runtime.zip at runtime, anyway. And for non-Oracle JDBC drivers you can remove the whole oracle.* hierarchy from runtime.zip.
    (4) You do need to deploy those .ser files with the bean. Or use -ser2class and deploy class files with the bean.
    (5) Finally, it appears the WLS deployment tool has not heard about SQLJ - it may only understand .java files. In this case you have to translate all .sqlj files (and the .ser files) into .java files before putting these into WLS:
    (a) run SQLJ over the .sqlj source with the -compile=false option. This produces .java files.
    (b) you can also turn the .ser files into .java files by running:
    java sqlj.runtime.profile.util.SerProfileToClass -nc *.ser
    (issue the line without arguments to get an option synopsis)
    You'd want to do (a) and (b) via a Makefile and not do it by hand more than once.
    (c) During deployment time and runtime you must have runtime.zip (modulo comments in (3)) in the respective CLASSPATHS of the deployment tool and of the server.
    Sorry these answers were rather generic - I still could not tell exactly how you are failing in WLS.

  • How to load date column using sql loader

    Hi,
    I am trying to load a file using sql loader. my date value in the file is '2/24/2009 8:23:05 pm',
    In control file for this column i specified like this
    rec_date date ''mm/dd/yyyy hh:mi:ss pm"
    But i am getting following error
    not avalid month.
    Thanks
    sudheer

    Hi,
    Use this example as reference:
    CTL file:
    LOAD DATA
    INFILE 'test.txt'
    BADFILE 'test.bad'
    truncate INTO TABLE T3
    FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '|' TRAILING NULLCOLS
    dt_date DATE "mm/dd/yyyy hh:mi:ss pm")DAT file:
    2/24/2009 8:23:05 pm
    C:\ext_files>sqlldr hr/hr control=test.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Wed Jul 1 20:35:35 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 1
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL> desc t3;
    Name    Type Nullable Default Comments
    DT_DATE DATE Y                        
    SQL> select to_char(dt_date, 'mm/dd/yyyy hh24:mi:ss') from t3;
    TO_CHAR(DT_DATE,'MM/DD/YYYYHH2
    02/24/2009 20:23:05
    SQL> Regards,
    Edited by: Walter Fernández on Jul 1, 2009 8:35 PM - Adding example...
    Edited by: Walter Fernández on Jul 1, 2009 8:38 PM
    Edited by: Walter Fernández on Jul 1, 2009 8:41 PM - Fixing some information...

  • Which LKM and IKM to use for Fast data loading b/w MSSQL 2005 and Oracle 11

    Hi,
    Can anybody help us to decide which LKMs and IKMs are best for data loading between MSSQL and Oracle.
    Staging Area is Oracle. We have to load around 400Million rows from MSSQL to Oracle 11g.
    Best regards,
    Muhammad

    Thanks Ayush,
    You are right and it has dumped the file very quickly; but it is giving error on sqlldr call thorugh jython. I have reaised SR with oracle to look into it further.
    thanks again and have a very nice time.
    Regards,
    Muhammad

  • Assistance Needed on Data Load Monitoring

    presently i'm working in a support proj which is data load monitoring ( mainly process chains) , As a result of which i will the responsible person to fix some of the loads when it fails eg : Duplicate records, errorneous records, attrbutute chain run etc .
    As a fresher in BW i need to learn some of the things like Types of updates, process types & process chains proficiently thick & fast , i request you to please send in some PDF's or ppt regarding the same , if any books are there then please suggest one.
    i Need mainly regarding
    Dataflow & update Types Briefly .
    process Types , chains
    Delta mechanism .
    Hope you will bail me out of this situation.
    Thanks in Advance ,
    HP

    Here are all the links:
    sap document on process chains:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8da0cd90-0201-0010-2d9a-abab69f10045
    help.sap.com link for creation of process chains:
    http://help.sap.com/saphelp_nw04/helpdata/en/67/13843b74f7be0fe10000000a114084/frameset.htm
    helpful threads on issues related to process chains:
    Process Chains creation and monitoring
    Process Chain
    Re: OPEN HUB with Process Chain
    http://help.sap.com/saphelp_nw04/helpdata/en/67/13843b74f7be0fe10000000a114084/frameset.htm
    Re: OPEN HUB with Process Chain
    https://forums.sdn.sap.com/click.jspa?searchID=6646868&messageID=3806122
    Re: attribute change run
    https://forums.sdn.sap.com/click.jspa?searchID=6646868&messageID=3790051
    Re: Process Chain Scheduling
    https://forums.sdn.sap.com/click.jspa?searchID=6646868&messageID=4426820
    Re: Process Chain
    https://forums.sdn.sap.com/click.jspa?searchID=6646868&messageID=3692343
    Re: Process Chain
    https://forums.sdn.sap.com/click.jspa?searchID=6646868&messageID=3841608
    Re: Can a process can have more than one variant?
    https://forums.sdn.sap.com/click.jspa?searchID=6646868&messageID=3855067
    Re: about the open hub...!
    https://forums.sdn.sap.com/click.jspa?searchID=6646868&messageID=3700389
    Re: Process chain statistics
    https://forums.sdn.sap.com/click.jspa?searchID=6646868&messageID=4162319
    Re: Process Types in BI 7.0
    https://forums.sdn.sap.com/click.jspa?searchID=6646868&messageID=3759916
    Re: How to deactivate the local chain in Main chain
    https://forums.sdn.sap.com/click.jspa?searchID=6646868&messageID=3591699
    Re: changing a process type during running of process chain
    https://forums.sdn.sap.com/click.jspa?searchID=6646868&messageID=3750639
    Re: Node for Process chain--Urgent
    https://forums.sdn.sap.com/click.jspa?searchID=6646868&messageID=3692720
    Re: Process Chains Events
    https://forums.sdn.sap.com/click.jspa?searchID=6646868&messageID=3707415
    Re: process chain event trigger problem
    https://forums.sdn.sap.com/click.jspa?searchID=6646868&messageID=4374184
    Thanks.,...
    Shambhu

  • Can one build a data warehouse using SQL rather than Warehouse Builder?

    I would like to build a data warehouse purely using SQL statements. Where can I find the data warehouse extension of SQL statements?

    I am exploring the internal workings of Warehouse Builder.
    I have written a SQL script to generate sample data to be inserted into tables, then write SQL script to do Extraction, Transformation and Loading using MERGE,, GROUP BY CUBE, DECODE, etc.
    If anyone has any experience of just using SQL to perform ETL, would you share your expeience here? Thanks.

  • Multiple date formats using sql developer

    Hello!
    i have 2 date fields in a table.. one is populated using trunc(<date1>) and the other is to_date(<date2>,'YYYYMMDD HH24MISS'). We want <date1> to display as MM/DD/YYYY and <date2> to display as MM/DD/YYYY HH:MI:SS AMPM. When we set the date format under Preference -> Database -> NLS parameter in SQL Developer with a time format it adds 12:00:00 to <date1>, if we take it out, it drops the time in <date2>. What can we do?
    thanks!

    I think what the original poster wanted was to display the two date columns using different formats in the table "Data" tab and AFAIK that is not possible. Setting a date format in the Preferences accomplishes the same thing as the statement
    ALTER SESSION SET NLS_DATE_FORMAT='<some format>';
    in command-line SQL*Plus. To do what the OP wants they'll need to create a view that has a SELECT something like this:
    SELECT TO_CHAR( date1, 'YYYY-MM-DD' ) date1
    , TO_CHAR( date2, 'YYYY-MM-DD HH24:MI:SS') date2
    FROM some_table;
    One thing the OP needs to keep in mind is that the DATE datatype stores both date and time together. If they insert a date alone, the time defaults to midnight. (This is stated in the Oracle SQL Reference.)
    Ed. H.

  • Checking correct data format using sql query

    1) I got column date of joining which accepts date in below format
    DD-MON-YYYY
    DD-MON-YY
    MON-DD-YYYY
    MON-DD-YY
    Month DD,YYYY
    Question:- how do i check whether all dates in Date of joining column are in above format or not using sql query?
    2) I got one more date column which accepts date in below format
    MMDDYYYY
    YYYYMMDD
    MM/DD/YYYY
    MM/DD/YY
    YYYY/DD/MM
    Question:- how do i check whether all dates in date column are in above format or not using sql query?
    sorry if it is a very simple question since I am new to sql and trying to learn ......Thanks for the answers from the group............

    In short, NO, it's not possible.  If you store dates correctly in the database as DATE datatype then you don't have this problem.  If you store them as VARCHAR2 you have a problem.
    So, you get a date of 20092012
    Is that 20th September 2012?  or is it 20th December 2009?
    What about...
    11-Jan-12
    Is that 11th January 2012 or 12th January 2011?
    Dates should never be stored on the database as strings.  That is why Oracle gives you a DATE datatype so you can store them properly.
    Also, when dates are passed from an application to the database, the application should be passing them as DATE datatype, and the application interface should be designed to accept dates from the user in a format specific to their country/locality and it would then know what that format is and automatically convert it to a DATE datatype before it gets anywhere near the database or any SQL.

  • Help needed with Dashboard prompt using SQL Constrain

    I am trying to implement a filter using presentation variables in a Dashboard Prompt.
    I wish to use SQL filter to Constrain the results to populate the 2nd Combo Box.
    The solution works for the 1st time, and there after it doesn't.
    Can anyone suggest a better approach or correct me if I am doing anything wrong.
    NOTE: I do not wish to use 'Constrain' Check box which is provided by Oracle.
    The code -> http://picasaweb.google.com/lh/photo/GTEQfuC6g7xGeP6HXor6_A?feat=directlink
    It works the First time ->http://picasaweb.google.com/lh/photo/SUrrZJSgB5W8H39D899yGQ?feat=directlink
    Hence forth it does not -> http://picasaweb.google.com/lh/photo/vUVrMPbPpdEzj7nHnePZEg?feat=directlink
    -Rohit.

    hi....
    your picasa is not opening.. i don't know why??
    follow this.. Can presentation variable created in one Dashboar prompt be used in other?
    see my first reply in this thread..
    may it solves..
    Thanks & Regards
    Kishore Guggilla

  • Dual Language Data upload using SQL*Loader

    I have to load data consisting of English and Traditional Chinese characters into 8.1.5 from external files. These external files are in MS Excel.
    Is there any way that I can user SQL*Loader for this ? If yes, how ? If not, is there any other way out.
    The NLS in the database is currently AMERICAN.
    null

    ORA-00604 error occurred at recursive SQL level string
    Cause: An error occurred while processing a recursive SQL statement (a statement applying to internal dictionary tables).
    Action: If the situation described in the next error on the stack can be corrected, do so; otherwise contact Oracle Support Services
    This kind of error occurs when data dictionary is
    query a lot.
    Joel P�rez

  • Given data is (10,20,.,30)how to load the data  from flat file to base table by eliminate the dot from data by using sql loader

    pls send ans for this

    1b5595eb-fcfc-48cc-90d2-43ba913ea79f wrote:
    pls send ans for this
    use any text editor to eliminate the dot before loading

  • Needs Partial data load in PSA

    Hi All
    While loading Employee data from Data Source (File Source System) to PSA, i got error in 1 record, so PSA was not loaded at all. What i want is: it should load all other valid records ignoring the bad record.
    Pls. help me in solving this small issue.
    Thanks in Advance
    Harpal
    Edited by: Harpal Singh on Nov 12, 2009 11:41 PM

    Hi ,my friend,
    If you are not able to see the selection in the datapackage for the particular field the you need to select the field (i mean check the in R/3) save the data source and replicate the data source in Bw system .
    Now go to the infopackage ---> data selection ---> there give your filter value for the field.
    (also you can write abap routine in the infopackage level  next to from value and to value , select 6 type variable change  the system will prompt you to write a routine at the infopackage level) this is Optional.
    Apart from this you can filter in the data selection ( from and tooo oprions in the infopackage)
    selsec it and load the data
    Santosh
    Edited by: Santhosh Nagaraj on Nov 13, 2009 10:24 PM

  • I need faster page loads

    Does anyone know how to make pages load faster? My page loads
    incrementally at the moment. The only images on my home page are
    .gifs so I'm wondering why it still comes in choppy when the files
    are so small.

    Just because an image is a GIF doesn't mean it is also
    small....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "s.joyful" <[email protected]> wrote in
    message
    news:eisp7k$ism$[email protected]..
    > Does anyone know how to make pages load faster? My page
    loads
    > incrementally at
    > the moment. The only images on my home page are .gifs so
    I'm wondering
    > why it
    > still comes in choppy when the files are so small.
    >

  • How to read varbinary data type using sql server

    Hello,
         I'm converted a text file data into varbinary format, and stored in DB table. Now I need to read
    Varbinary column and store in Temp table
    in sql server.
     can some one help on this.
    Regards,
    Praven
    Regards, Praveen

    I understand this question is related to your previous thread and I believe what Erland suggested is the best way to implement this.
    https://social.msdn.microsoft.com/Forums/en-US/a96a8952-0378-4238-9d9d-85b053182174/send-direct-text-file-as-a-input-parameter-to-sp?forum=transactsql
    I believe when the user uploads the data its getting uploaded onto the Application Server, You could then open the file and import the files into SQL server(all using application code) and do the manipulations. I believe this is the better way of handling
    this.
    Also what is the expected file size and what is the kind of data you are expecting?
    Satheesh
    My Blog | How to ask questions in technical forum

  • Need Help with Formula using SQL maybe

    I need help!  I work with Crystal reports XI and usually manage just fine with the Formula editor but his one I think will require some SQL and I am not good at that.
    We are running SQL 2000 I think (Enterprise Manager 8.0)  Our sales people schedule activities and enter notes for customer accounts.  Each is stored in a separate table.  I need to find activities that are scheduled 240 days into the future and show the most recent note that goes with the account for which that activity is scheduled.
    The two tables, Activities and History, share the an accountID field in common that links them to the correct customer account.   I want to look at dates in the Startdate.Activities field more than 240 days in the future and show the most recent note from the History table where the accountid's match. I figure my query will contain a join on AccountID.Activities and AccountID.History used with Max(completedate.History) but I do not understand how to word it.
    I would like to perform all this in crystal if possible.  I humbly request your help.
    Membery

    You SQL would look something like this...
    SELECT
    a.AccountID,
    a.BlahBlahBlah, -- Any other fields you want from the Activities table
    h.LastComment
    FROM Activities AS a
    LEFT OUTER JOIN History AS h ON a.AccountID = h.AccountID
    WHERE (a.ActivityDate BETWEEN GetDate() AND DateAdd(dd, 240, GetDate()))
    AND h.HistoryID IN (
         SELECT MAX(HistoryID)
         FROM History
         GROUP BY AccountID)
    This method assumes that the History table has a HistoryID that increments up automatically each time a new comment is added... So a comment made today would always have a higher HistoryID that one made yesterday.
    If I'm wrong and there is no HistoryID or the HistoryID doesn't increment in a chronological fashion, it can still be done but the code is a bit more complex.
    HTH,
    Jason

Maybe you are looking for

  • Calling foreign EJB server from Weblogic

    Hi, I'm trying to invoke an EJB hosted in an old PowerTier EJB Container from an 8.1 SP5 hosted EJB, and I'm running in to problems. (PowerTier is based on the JBroker ORB) So far the only way I can get it to work is by replacing Weblogic's ORB imple

  • Outbound 856 - Error generating an IDOC

    Hi Everyone,   We have a scenario where we need to generate an IDOC for Advance shipping notification for 856 outbound, the basic settings required to do the same are done using the message type DESADV and IDOC type DESADV01. However the IDOC is not

  • Embed a specific part of a webpage using iframes.

    Hi, I've had an in depth search of the forums and can't find anything to help me. I know to use iframes to embed a web page within a webpage but I want to choose a specific portion of a webpage - how do I do that? Thanks for your help.

  • High CPU on BPEL Manager until Dehydration store purged

    We are seeing that if we get run-time exceptions while running BPEL processes we will have high CPU on the system until we shut down the BPEL instance, purge the dehydration store, and restart the instance. If we shut the instance down and restart th

  • HT201272 I purchase the audio book resurrection for $32.99 but never downloaded ?

    Please how can retrieve the purchased item: resurrection $32.99  and  never downloaded just froze without a notice way ,can i have I credit if not?