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

From: Vlad <marchenko(at)gmail(dot)com>
To: David Stanaway <david(at)stanaway(dot)net>
Cc: Brandon Metcalf <bmetcalf(at)nortel(dot)com>, 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-08 19:07:04
Message-ID: cd70c6810504081207640d91f5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

David,

it's acceptible (actually better in form of passing columns type via
bind_values) as a quick workaround for a small scripts only. Actually
as a quick workarround it's easier to downgrade DBD::Pg.

Think of numerouse DB-OO Mappers and Object Persistance tools... it
won't be easy to fix all of them. As of right now a lot of times you
get screwed if you upgrade DBD::Pg to 1.40-1.41.

On Apr 8, 2005 2:44 PM, David Stanaway <david(at)stanaway(dot)net> wrote:
> On Fri, 2005-04-08 at 14:12 -0400, Vlad wrote:
> > we've noticed that too here and quick explanation is - with the new
> > "prepare" implementation, the query get prepared on the server side,
> > which is good; the problem is that all of the bind values passed to
> > the sql server during execute call are in form of ***varchar***, i.e.
> > even if a field is of int type in postgresql table, DBD::Pg passes
> > your bind value as char - as a result, postgresql doesn't use indexes.
>
> A work around would be in the sql to cast the param to the appropriate
> type.
>
> EG: SELECT * FROM Person WHERE personid = %::int
>
> --
> David Stanaway <david(at)stanaway(dot)net>

--
Vlad

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Brandon Metcalf 2005-04-08 19:10:33 Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg
Previous Message David Stanaway 2005-04-08 18:44:46 Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg