Thread: Array interface
I sent 2 emails, both containing a Perl code sample, but none of them went through. Essentially, I was testing Perl array bind & execute. Everything went well, except for the fact that array execute is no faster than the row-by-row way of executing things. I was surprised because I expected array bind to produce better results over the network than the row-by-row operations, yet it didn't. Can anybody elaborate a bit? It seems that some kind of email scanner has quarantined my emails containing Perl code samples as dangerous, so I can't really show the code sample. -- Mladen Gogala Sr. Oracle DBA 1500 Broadway New York, NY 10036 (212) 329-5251 http://www.vmsinfo.com The Leader in Integrated Media Intelligence Solutions
On Tue, Nov 2, 2010 at 2:32 PM, Mladen Gogala <mladen.gogala@vmsinfo.com> wrote: > I was surprised because I expected array bind to produce better > results over the network than the row-by-row operations, yet it > didn't. Can anybody elaborate a bit? While all of the bulk-execute functions are likely to have implementations, they are not necessarily likely to actually be efficient implementations. I ran into this with DBD::ODBC a while back because DBD::ODBC implements execute_array() as "execute($_) foreach(@_)". DBD::Pg doesn't appear to implement execute_array() at all, so perhaps it's falling back on a similar default implementation in the superclass. I generally suspect this is a Perl problem rather than a Postgres problem, but can't say more without code. Maybe try pastebin if you're having email censorship issues. -Conor
Conor Walsh wrote: > > I generally suspect this is a Perl problem rather than a Postgres > problem, So do I. I had the same situation with Oracle, until John Scoles had the DBD::Oracle driver fixed and started utilizing the Oracle array interface. > but can't say more without code. Maybe try pastebin if > you're having email censorship issues. > > -Conor > > I posted it to comp.databases.postgresql. -- Mladen Gogala Sr. Oracle DBA 1500 Broadway New York, NY 10036 (212) 329-5251 http://www.vmsinfo.com The Leader in Integrated Media Intelligence Solutions