3 ms·
In the same vein as caching (and why caching is good) but the less DB activity each page request can generate, the better. Shared hosts seem to be very conserva
by Jach 16y ago
In the same vein as caching (and why caching is good) but the less DB activity each page request can generate, the better. Shared hosts seem to be very conservative with how many concurrent DB connections are allowed to be open at any one time, HostGator's limit is I believe 25. But persistent connections are usually available; PHP has mysql_pconnect and mysqli_connect('p:' . $host).
- calloc 16y agoI've always had a lot of issues with mysql_pconnect in PHP. Hung connections, connection reuse causing data corruption, and various other random issues. Generally using just mysql_connect is faster than using mysql_pconnect. On the server I admin for a large website with millions of hits a day we don't use mysql_pconnect.