Mike H wrote:
> Hi all,
> 
  > Is there a recommended solution for connection pooling with postgres?
> I've seen SqlRelay and pgpool mentioned but they both seem to have 
> downsides in terms of affecting query performance. What have people here 
> used?
> 

I use pgpool and it works brilliantly. I really depends on what type of 
queries you will eventually be making. Pgpool is very good at avoiding 
the overhead of forking a new postgres process to get a "hard" 
connection every time. The query overhead thus far has not been 
noticeable. It's likely that if you will be making many connections per 
second and each of the queries on the connection are few and short then 
pgpool will be a winner for you. If you are likely to be throwing large 
SQL statements and retrieving lots of data for each request then the 
query overhead may outweigh the time saved to get the connection.

If you are going to be using the auth application or sessions it's 
likely that you will have a connect and couple of short queries at 
request time anyway. Pgpool will certainly help with connections in this 
case.

postgres (at least under *nix OS) is very fast at creating new 
connections anyway. As far as I have timed it, pgpool saves me about 5 
to 6 ms per request. This may be insignificant if you are going to do a 
lot of work in each request.

Bottom line: try it with your typical set of request queries and see 
what difference it makes.

Cheers,
Gary.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to