Im trying to optimize some of my PHP code. I found out that most time of my PHP script is spent during the connection to my mysql database at the beginning of the script.
I only connect to the database once at the beginning and close the database connection at the end of the script.
But for each user requesting this page a new connection has to be established.
Is there a way to hold a reference to the database and share it for all requests?