Re: PostgreSQL client api

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: PostgreSQL client api
Дата
Msg-id b42b73150603290622yab4a41cm8de347d336e9d159@mail.gmail.com
обсуждение исходный текст
Ответ на PostgreSQL client api  ("Antimon" <antimon@gmail.com>)
Список pgsql-general
On 28 Mar 2006 17:01:45 -0800, Antimon <antimon@gmail.com> wrote:
> Nearly 3 times slower even w/o any table queries. But i could not
> reproduce this by writing stored procs on both which selects 0-10000 in
> a loop to a variable. results were almost same.
> (I tried pg_ and mysqli_ functions too, results were not too different)
>
> Is it mysql client libraries performs better? Or postgre stored procs
> are 3x faster? I cannot understand, since there is not even an io
> operation or any query planning stuff, what is the cause of this?

Yes, it is the case that raw select performance for pgsql  drastically
improves with prepares statements as much as 2-3x.  In my experience
postgresql is just a bit faster with prepared statements and
substantially slower without.  There is a little bit of pain in
setting them up properly in a pooling web environment but it is worth
it if you want top performance.

Does anybody know if php uses the parameterized flavors of the C API?
That's another huge optimization over PQexec.

I agree with Jim in that it't probably fast enough anyways.

Merlin

В списке pgsql-general по дате отправления:

Предыдущее
От: Bob Pawley
Дата:
Сообщение: Connecting
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Connecting