I have no idea how PDO’s connection pooling works, and I’m getting nowhere with searches.
First, for clarity, is PDO’s connection pooling automatic?
If not, how can I utilize it on an AJAX page?
I’ve clocked the time cost on my local wampserver dev of making a database connection via mysqli at 10ms per, and I’m trying to drive wait times as close to 0 as possible. This is one of my last issues.
If you are talking about persistent connections look here: http://php.net/manual/en/pdo.connections.php
Yes and the risk that they are never reused. Thanks to @carefulnow. I’ll quote his comments here:
So looking at the screenshots the questions is open, how to pickup these persistent connections again. Some answers on StackOverflow say, that they are cached on thread level, so if you have more than one thread (which is highly expected) than you get many connections. This opens the risk to run into the connection limit of mysql. Before using persistant connections make sure you understand how they work (which I don’t, but it seems @carefulnow :-))
PHP doc says they are cached, therefore I assume they are cleanup after a time.
More on the php doc