Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg
От | Vlad |
---|---|
Тема | Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg |
Дата | |
Msg-id | cd70c6810504081112694ba268@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg
Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg |
Список | pgsql-interfaces |
Hi there, 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. I don't know if developers of new DBD::Pg have some game plan to fix this problem... but it won't be easy: since perl is a no-var-type language, so either DBD::Pg needs to analyze the table columns data types first before executing a query and then use correct type for bind values, or let coder pass those types explicitly... though I'm not aware of a method in DBI that would let them do that... Anyone from DBD::Pg can comment this please? I was going to post an example to the list later today. On Apr 8, 2005 12:30 PM, Brandon Metcalf <bmetcalf@nortel.com> wrote: > Has anyone done any benchmarking between the old Pg interface and > DBI/DBD::Pg? I have two versions of some code one of which uses Pg > and the other DBI/DBD::Pg and the latter appears to cause much more of > load on the system where it's running than the former. However, I > haven't done any benchmarking to support this claim. > > -- > Brandon > _______________________________________________ > Dbdpg-general mailing list > Dbdpg-general@gborg.postgresql.org > http://gborg.postgresql.org/mailman/listinfo/dbdpg-general > -- Vlad
В списке pgsql-interfaces по дате отправления: