From: | "Brandon Metcalf" <bmetcalf(at)nortel(dot)com> |
---|---|
To: | Vlad <marchenko(at)gmail(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-08 18:17:23 |
Message-ID: | Pine.LNX.4.58L.0504081316270.18466@cash.rhiamet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
m == marchenko(at)gmail(dot)com writes:
m> we've noticed that too here and quick explanation is - with the new
m> "prepare" implementation, the query get prepared on the server side,
m> which is good; the problem is that all of the bind values passed to
m> the sql server during execute call are in form of ***varchar***, i.e.
m> even if a field is of int type in postgresql table, DBD::Pg passes
m> your bind value as char - as a result, postgresql doesn't use indexes.
m> I don't know if developers of new DBD::Pg have some game plan to fix
m> this problem... but it won't be easy: since perl is a no-var-type
m> language, so either DBD::Pg needs to analyze the table columns data
m> types first before executing a query and then use correct type for
m> bind values, or let coder pass those types explicitly... though I'm
m> not aware of a method in DBI that would let them do that...
Wouldn't bind_param() do just that?
--
Brandon
From | Date | Subject | |
---|---|---|---|
Next Message | Vlad | 2005-04-08 18:40:04 | Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg |
Previous Message | Vlad | 2005-04-08 18:12:31 | Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg |