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

I think part of the problem we're having is that you are expecting the stored procedure to know what to do with with a Perl array. You need to feed the stored procedure what it likes to eat; not being a stored proc guru, I can't say precisely what stored procs like to eat, but I'm guessing it's not Perl arrays.

How would the stored procedure know how to unpack the array? Perhaps you could do some sort of binary packing that could then be unpacked by the stored proc, but that's not the kind of thing I'd use a stored procedure for.

My suggestion is to feed each record to the stored procedure individually. This is a pretty common thing to do.

By the way, 100 records is nothing. That's test data where I come from. When you start talking in millions and portions of millions things get interesting.

Also, it seems to me that stuffing everything into an array, passing that array to the proc and having the proc process each record in the array and then insert it is very, very similar to letting perl unpack the array and pass in each record to the proc for further processing and insertion.

I'm sure this isn't particularly helpful, but may shed some light on a solution for you.

Regards,

Cat

  • Comment on Re: Passing Arrays from Perl to Stored Procedures