Which is better: mysql_connect or mysql_pconnect

后端 未结 3 2032
臣服心动
臣服心动 2020-12-14 12:18

I\'m a PHP newbie working a some scripts to display some news articles from a databse and wanted to find out a couple of things.

  • For opening a connection to a
3条回答
  •  执念已碎
    2020-12-14 12:49

    You should use mysql_pconnect on highly loaded sites, thus the connection would be reused. This may improve speed up to twice...

    But, if you do not expect high loads; use normal connect for reasons Svetlozar Angelov mentioned above.

提交回复
热议问题