Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg
От | Brandon Metcalf |
---|---|
Тема | Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg |
Дата | |
Msg-id | Pine.LNX.4.58L.0504111010370.18466@cash.rhiamet.com обсуждение исходный текст |
Ответ на | Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg ("Greg Sabino Mullane" <greg@turnstep.com>) |
Список | 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 по дате отправления: