Another bad thing is that a database typically has a limit on the number of open connections that can be maintained. Using persistant connections tends to use up available connections.
Just wondering....
What conditions DOES a persistant connection close under? Must it be closed manually, or will pcons remain open indefinately once opened (hence causing the problem with reaching the connection limit)
Also, I'm a little confused at what causes a new connection to be opened or an existing one to be reused...
Say I have a website which has a database. All the visitors of the website have the same access to the database, with no logging in... eg browsing a library catalogue.
After reading the info on p_connect, I get the impression that persistant connections WOULD be useful here, as one connection could serve all visitors (only creating a new one when two visitors try to use it at the same time).
After a while of operation, there may be 10 or so connections open, due to people trying to query at the same time.... The chances of more than 10 people querying at the same time and hence causing more connections to be needed is pretty low...
So in effect, this has become a connection pool.
...or have I made a big logic error somewhere?
~Kefka