Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    25

    Post Unanswered: Oracle Bulk Insert

    Hi guys,

    I'm exploring Oracle's world and I have a problem

    I want to insert a lot of records in a table, but it takes a very very long time.

    I do this by the simplest way

    insert into table (Field1, Field2, Field3) values ('value1','value2','value3')
    insert into table (Field1, Field2, Field3) values ('value1','value2','value3')
    .
    .
    .
    insert into table (Field1, Field2, Field3) values ('value1','value2','value3')

    (i have a while and build de insert inside it...)

    I know that you can help me to improve performance in this task

    Thanks in advance...

  2. #2
    Join Date
    Jan 2005
    Location
    Green Bay
    Posts
    201
    I am assuming that you are doing something like this

    Do While not end
    Take input file either fixed or Delimited
    and append 'insert into statment'
    end while

    You can take that input file or
    (create you output file as fixed or deleimted) and use sqlldr to load data quickly 1million rows in seconds

    this is a good site
    http://www.lc.leidenuniv.nl/awcourse...96652/ch06.htm

  3. #3
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool


    Instead of creating "INSERT" statements with your "WHILE" script, build a delimited file (comma or other) with the data and either load with sql loader utility or create an external table.

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  4. #4
    Join Date
    Feb 2004
    Posts
    25
    thanks rbackmann and LKBrwn_DBA, i will try with sqlldr and see what happens, i will also take a look at the article you tell me.

    Thanks again!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •