Persistent VS non-persistent MySQLi connection

“The idea behind persistent connections is that a connection between a client process and a database can be reused by a client process, rather than being created and destroyed multiple times. This reduces the overhead of creating fresh connections every time one is required, as unused connections are cached and ready to be reused.”

https://www.php.net/manual/en/mysqli.persistconns.php

To open a persistent connection with mysqli you must prepend p: to the hostname when connecting.

Testing performance gain by using persistent connection on a joomla site was not conclusive:

https://www.itoctopus.com/how-to-use-mysql-persistent-connections-on-joomla-sites#:~:text=A%20non%2Dpersistent%20MySQL%20is,script%20end%20and%20is%20reused.