Question

I want to know that when I should use mysql_pconnect instead of mysql_connect.

Was it helpful?

Solution

The answer is you shouldn't use either because the mysql_* extension is deprecated.

If we rewind several years, then the answer is still pretty much the same - in other DBMS' establishing connections is often slower so persistent connections can be used to increase performance. It's quite common that persistent connections cause more harm than good with mysql/php

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top