Skip site navigation (1) Skip section navigation (2)

Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg

From: "Brandon Metcalf" <bmetcalf(at)nortel(dot)com>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: dbdpg-general(at)gborg(dot)postgresql(dot)org,pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg
Date: 2005-04-11 15:14:25
Message-ID: Pine.LNX.4.58L.0504111010370.18466@cash.rhiamet.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
g == greg(at)turnstep(dot)com writes:

 g> Let's slow down and back up a bit. First, what version of
 g> PostgreSQL are you using to compile DBD::Pg, and what version
 g> are you connecting to? Many of the things being discussed
 g> have already been solved if you are running a modern version
 g> of PG (e.g. 7.4 or greater).

 g> The binding is already handled quite well: we use PQprepare
 g> whenever possible. The default of type "VARCHAROID" is mostly
 g> cosmetic, so that some other things work: we actually send
 g> a type "unknown" (0) if no type is specified for a placeholder
 g> via bind_param. (see the "defaultval" of the placeholder
 g> struct). Older servers may benefit from the VARCHAROID change
 g> however, so I will see about making that change.

 g> The stuff in types.c could certainly use some cleaning up, but
 g> it is also not really used anymore - we let the server do all
 g> 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

In response to

pgsql-interfaces by date

Next:From: mpsDate: 2005-04-11 22:34:39
Subject: Re: pg.py under Mac OS X
Previous:From: Robin BoerdijkDate: 2005-04-11 08:11:06
Subject: Tool for generating DAO classes?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group