Jump to content

Archived

This topic is now archived and is closed to further replies.

isaac_cm

connection optimization

Recommended Posts

I am using this command to connect to my database

mysql_pconnect($hostname_mainsqldb, $username_mainsqldb, $password_mainsqldb) or trigger_error(mysql_error(),E_USER_ERROR);

is it right to use single connection all over th site or I have to make multiconnections to achieve best speed

thanks

Share this post


Link to post
Share on other sites
I'm not sure what you mean by "all over the site", but one connection per page should be sufficient.  Then again, I'm not sure if persistent connections are really desirable.

Share this post


Link to post
Share on other sites
thanks, I totaly forget to see this post

I am also a windows programmer so I just worried about the speed of fetching data from the database specially when large number of peoplr is visiting my site

thanks again

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.