Page 1 of 1

Question about keeping the server load down...

Posted: Tue Feb 15, 2005 3:29 pm
by Mr Tech
This what I got from my web host as a sugegstion to keep my scripts running fast and the server laod down.
Being a website using dynamic pages and database-driven, we suggest the use of persistent queries on your database, avoid exceeding the servers maximum mysql connections by spliting it up between separate databases.
How do I use persistent queries on my database?

Thanks

Ben

Posted: Tue Feb 15, 2005 3:37 pm
by feyd
mysql_pconnect()

Posted: Wed Feb 16, 2005 7:22 am
by Maugrim_The_Reaper
Be careful - if you use a lot of mysql queries your persistent connection can make things worse - not better. Have some idea of what difference it truly makes before making it a permanent fixture.

I know of a number of hosts who ban persistent connections outright...

Posted: Wed Feb 16, 2005 7:40 am
by n00b Saibot
:lol:

Code: Select all

if($_SERVERї'load'] > $MAX_LOAD) mysql_dontconnect();
:lol: