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.


In reply to Re: Re: Passing Arrays from Perl to Stored Procedures by Anonymous Monk
in thread Passing Arrays from Perl to Stored Procedures by TheYoungMonk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.