根据php手册:
Persistent connections are not closed at the end of the script, but are cached and re-used when another script requests a connection using the same credentials. The persistent connection cache allows you to avoid the overhead of establishing a new connection every time a script needs to talk to a database, resulting in a faster web application.
一个优点是效率,我们不需要在每次脚本执行时都建立连接。持久连接的其他优点是什么?比如查询缓存等?
最佳答案
它允许跨多个请求恢复事务以及允许连接设置(例如字符集编码)持续存在
关于php - mysql使用持久连接的目的和好处是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44581377/