Jump to content


Photo

connection optimization


  • Please log in to reply
2 replies to this topic

#1 isaac_cm

isaac_cm
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts

Posted 26 October 2006 - 06:00 PM

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

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 28 October 2006 - 03:50 PM

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.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 isaac_cm

isaac_cm
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts

Posted 16 November 2006 - 12:09 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users