connecting each time
Moderator: General Moderators
connecting each time
I have this page on my site which is included() with every page of my site. it can possibly look one way based on a variable at different times. Right now, I have started putting those variables in php right on the page but I also have the stuff in a database. Is it a bad idea to have that page open my sql database every time it's loaded? Also, does that cut down on speed significantly?
Re: connecting each time
No, you'll never notice any difference. If you were getting as many hits per second as Amazon or Google, possibly you could measure the time it would take to connect, but for 99.99% of web sites, it will be so small it is insignificant. That's what it's designed to do.matt1234 wrote:I have this page on my site which is included() with every page of my site. it can possibly look one way based on a variable at different times. Right now, I have started putting those variables in php right on the page but I also have the stuff in a database. Is it a bad idea to have that page open my sql database every time it's loaded? Also, does that cut down on speed significantly?