in reply to Re: Passing Arrays from Perl to Stored Procedures
in thread Passing Arrays from Perl to Stored Procedures

As was stated before, 100 records to a database is NOTHING.

DBD::Oracle apparently does not support passing whole arrays for binding, if it did I'm sure there would be some code behind it that broke the array down to individual elements and bind each of them. So I would suggest something that once you have your statement prepared pass it to a sub like this (untested btw)...

sub BindValues { my $csr = shift; my $array_ref = shift; my $i; my $placeholder; foreach $i ( 0 .. $#$array_ref ) { $placeholder = ":" . $i; $csr->bind_param($placeholder, $array_ref->[$i]); } }

Call it like this... BindValues( $csr, \@CSVArray );

I don't have much experience with Perl and databases, I have some DBD::Oracle experience, but I have more experience in other languages and have yet to see bind parms be anything other than individual elements.

Like the other post under this one I'm replying to says, prepare_cached makes things much faster and you will find that its not very inefficient at all and that the sub that breaks down your array and individually binds the items will run quite quickly.