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

Home -> Community -> Usenet -> c.d.o.server -> Re: Batch insert data into oracle from text file (cross)

Re: Batch insert data into oracle from text file (cross)

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Thu, 22 Dec 2005 14:01:01 GMT
Message-Id: <pan.2005.12.22.14.01.01.243317@sbcglobal.net>


On Thu, 22 Dec 2005 17:45:27 +0800, Scarab wrote:

> Hi,
> I have some files contains the rows of a table, and I can parse the files
> and get the values of each collumn for the table, and my task is import the
> data into the table. I want to write an application to do this.
> What is the most smart way? Can OCI APIs do batch commit?
>
> Because I have about 3G files to import every day, so performance is greatly
> valued.
>
> Thanks.

Normally, I'd recommend you to use Perl as it is ideal for parsing files, but the underlying module doesn't support array interface, which means that you cannot get the performance you need from the DBI module. OCI, of course, can do both "batch commits" and direct loads. If you need performance, you'll have to write a specialized C program using lex (or flex) to parse the input and then insert it into Oracle.

-- 
http://www.mgogala.com
Received on Thu Dec 22 2005 - 08:01:01 CST

Original text of this message

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