develooper Front page | perl.dbi.users | Postings from November 2011

Re: Design Pattern to keep a connection opened?

Thread Previous | Thread Next
From:
John R Pierce
Date:
November 5, 2011 20:58
Subject:
Re: Design Pattern to keep a connection opened?
Message ID:
4EB605C4.5000604@hogranch.com
On 11/05/11 8:46 PM, Bruce Johnson wrote:
> Why not just open a database connection, run the procedure and close it again? :
>
> Loop
> 	open db
> 	run proc
> 	close db
> End loop
>
> ?
> If the connection is staying open long enough to get stale and be disconnected, then you shouldn't be running into timing issues.
>
>

or do exactly that, only with a connection pooler like pgbouncer...



-- 
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About