Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg - Mailing list pgsql-interfaces

From Brandon Metcalf
Subject Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg
Date
Msg-id Pine.LNX.4.58L.0504111010370.18466@cash.rhiamet.com
Whole thread Raw
In response to Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-interfaces
g == greg@turnstep.com writes:
g> Let's slow down and back up a bit. First, what version ofg> PostgreSQL are you using to compile DBD::Pg, and what
versiong>are you connecting to? Many of the things being discussedg> have already been solved if you are running a
modernversiong> of PG (e.g. 7.4 or greater).
 
g> The binding is already handled quite well: we use PQprepareg> whenever possible. The default of type "VARCHAROID" is
mostlyg>cosmetic, so that some other things work: we actually sendg> a type "unknown" (0) if no type is specified for a
placeholderg>via bind_param. (see the "defaultval" of the placeholderg> struct). Older servers may benefit from the
VARCHAROIDchangeg> however, so I will see about making that change.
 
g> The stuff in types.c could certainly use some cleaning up, butg> it is also not really used anymore - we let the
serverdo allg> the quoting for us now via PQexecPrepared and PQexecParams.
 


This is consistent with what I'm seeing.  That is, I see no
performance change using Vlad's patch to DBD-Pg-1.41.  What I am
seeing, however, is my code that uses the old Pg interface is much
faster than my version that uses DBI/DBD::Pg.  But this is probably in
the way I'm using it.  For example, there are places where I should be
using execute_array() instead of wrapping a loop around execute().

-- 
Brandon


pgsql-interfaces by date:

Previous
From: Robin Boerdijk
Date:
Subject: Tool for generating DAO classes?
Next
From: mps@theintraweb.net
Date:
Subject: Re: pg.py under Mac OS X