![]() |
|
|
|
#1 |
|
Hi,
I'm just wondering if anyone has experience with bulk loading data into an Oracle database with DBI. My options are to use DBI or Oracle's sqlloader. I'd rather do it using DBI, but I'm not sure what kind of perfomance hit I'll incur. I need to load 2 tables on a daily basis (~50MB). Any comments? - Greg. Greg H |
|
|
|
|
#2 |
|
Posts: n/a
|
SQLLoader will generally be faster.
Pretty much trial an error really For bulk inserts you should use DBI with placeholders. Bit of pseudo code, might help... my $sth = $dbh->prepare (SQL insert my $count = 0; loop $sth->bind_param(" $sth->bind_param(" ... ... eval { $sth->execute() }; if ($@) { print "Error......."; }; ... ... if ($count>50) { # Change this value depending on threshold, rollback segment size etc $self->doCommit($dbh); $count=0; } $count++; end loop $dbh->commit HTH AdrianK "Greg H" <> wrote in message news:<eVqRa.1340$>. .. > Hi, > > I'm just wondering if anyone has experience with bulk loading data into an > Oracle database with DBI. > > My options are to use DBI or Oracle's sqlloader. I'd rather do it using DBI, > but I'm not sure what kind of perfomance hit I'll incur. I need to load 2 > tables on a daily basis (~50MB). > > Any comments? > > - Greg. |
|