Pros and cons of using mysql_pconnect in php

320 Views Asked by At

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

1

There are 1 best solutions below

0
On BEST ANSWER

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