3 ms·
What's wrong with opening a MySQL connection on every page view? Unlike PostgreSQL, MySQL was specifically designed to handle a very large number of short-live
by kijin 2y ago
What's wrong with opening a MySQL connection on every page view?
Unlike PostgreSQL, MySQL was specifically designed to handle a very large number of short-lived connections. A properly configured MySQL daemon can handle tens of thousands of connections per second. If you're still opening and closing too many connections for that, MySQL supports using Unix domain sockets instead of TCP, and PHP supports persistent connections -- a sort of ad hoc connection pooling system.
There are many issues with WordPress and its ecosystem, for sure, but database connection handling isn't one.