From: | Gilles DAROLD <gilles(at)darold(dot)net> |
---|---|
To: | |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Connection pooling |
Date: | 2001-01-25 16:14:50 |
Message-ID: | 3A7050FA.C860FF9D@darold.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Aggarwal , Ajay | 2001-01-25 16:19:03 | 2 or more columns of type 'serial' in a table |
Previous Message | Peter Eisentraut | 2001-01-25 16:12:02 | Re: beta3 Solaris 7 (SPARC) port report [ Was: Looking for . . . ] |