PHP: is it better to open a MySQL connection once or multiple times?

1 points by mrfish ↗ HN
Should I open and close the DB connection everytime i do a query (i.e. put the DB stuff in a class/function) or open once and then close at the end of my app? Which uses less memory? Which makes the page faster? Anybody know of any resource links showing the difference?

0 comments

[ 2.9 ms ] story [ 20.4 ms ] thread

No comments yet.