Re: Connection pooling

Поиск
Список
Период
Сортировка
От Gilles DAROLD
Тема Re: Connection pooling
Дата
Msg-id 3A7050FA.C860FF9D@darold.net
обсуждение исходный текст
Ответ на Connection pooling  (Guillaume Lémery <glemery@comclick.com>)
Ответы Re: Connection pooling
Re: Connection pooling
Re: Connection pooling
Список pgsql-general
Hi,

With Apache/mod_perl it is very simple to enable DB connection
persistance.

in your perl script :

use vars qw($dbh);

$dbh ||= DBI::connect($datasrc, $dbuser, $dbpwd);

That create a persistance connection to your DB and you do not have to
care
about a pool of connection. Double pipe do all for you :-)

But if you really want a pool just create an array of this kind of global
var at startup
and switch to any indices as you want.

Don't forget to use Apache::DBI on top of DBI.pm. See mod_perl
documentation
for a complete setting.

Hope this help.

Regards,


Guillaume Lémery wrote:

> Hi,
>
> my database has to handle quickly several number of queries per second
> from numerous clients.
> Because of the waste of time for connection/disconnection, Im' looking
> for a connection pooling tool.
>
> Where can I find a such tool or can somebody send me one ?
>
> Many thanks in advance,
>
> Guillaume.


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

Предыдущее
От: "Dmitry Chernikov"
Дата:
Сообщение: Problem with PL/pgSQL in 7.03
Следующее
От: Peter T Mount
Дата:
Сообщение: Re: Connection pooling