Page 1 of 1

PHP Connection Pooling

Posted: Tue Feb 01, 2005 4:36 pm
by thomas777neo
Like Java, can Php also use connection pooling.

Posted: Tue Feb 01, 2005 5:31 pm
by feyd
I believe you are talking about persistant connections, that depends on the API you are using.. MySQL supports it, I believe PostgreSQL also supports it.

Posted: Tue Feb 01, 2005 6:03 pm
by patrikG
Oracle has permanent connections as well. If you're worried about performance set KeepAlive to Off in http.conf if you're running PHP on Apache.

RE:pooling

Posted: Wed Feb 02, 2005 4:07 am
by thomas777neo
I don't really want to create a persistant connection. I want to create say 5 connections. If I am going to execute a query I can simply fetch one of the available connections, use it and then put it back into the pool.

So instead of creating one persistant connection, or connecting everytime. Just fetch a connection and put it back.