Re: PQconnectStart/PQconnectPoll

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: PQconnectStart/PQconnectPoll
Дата
Msg-id 50ADFFD0.7070503@2ndQuadrant.com
обсуждение исходный текст
Ответ на PQconnectStart/PQconnectPoll  (Sergio Mayoral <mayoralstuttgart@yahoo.com>)
Список pgsql-performance
On 11/15/2012 05:02 PM, Sergio Mayoral wrote:

PQconnectdb is taking too long comparing to mysql and i found out the time is consumed by PQconnectPoll waiting for the socket to be ready for reading/writing
What's "too long"?

I cannot use persistent connections. I must open/close a connection anytime I want to insert something new.
If you mean that you intend to open a new connection, do a single INSERT, and close the connection - your performance will be awful.

If your app can't use persistent or pooled connections, use PgBouncer as an external connection pool. Have your app connect to PgBouncer, and PgBouncer connect to PostgreSQL.


-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: fast read of binary data
Следующее
От: Niklas Paulsson
Дата:
Сообщение: SQL performance question