PHP Connection Pooling

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
thomas777neo
Forum Contributor
Posts: 214
Joined: Mon Mar 10, 2003 6:12 am
Location: Johannesburg,South Africa

PHP Connection Pooling

Post by thomas777neo »

Like Java, can Php also use connection pooling.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post 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.
User avatar
thomas777neo
Forum Contributor
Posts: 214
Joined: Mon Mar 10, 2003 6:12 am
Location: Johannesburg,South Africa

RE:pooling

Post 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.
Post Reply