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 :param1, :param2 etc)
my $count = 0;
loop
$sth->bind_param(":param1", $param1);
$sth->bind_param(":param2", $param2);
...
...
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" <gr********@telus.net> wrote in message news:<eV******************@news2.telusplanet.net>. ..
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.