Page 1 of 1

mysql query's just on page load

Posted: Sat Apr 03, 2010 11:17 am
by natz
Well, first of all, sorry if my grammar fails etc.

I wanna ask how the hell the people make their dynamic websites.

I have a innodb relational database for a user comunity in a website having flash games on it. You can just get everything relating the info of the users, because everything is in the database.

But for example, in my profile.php, i just trigger a get ?id=32525, this get just trigger a MYSQL query, then i have some AJAX for load the modeles about, "last visitors on the profile", "last, or better scores" etc, lot of info.
It just work well, but the site (without the comunity implemented yet) have lot traffic on it, this mean, lot of page load x number of query's for everything i want to get in real time...

The selects are really good in performance, they are 'using index', low rows, etc but a lot of people at time asking to the mysql <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span> is so cpu, we have only 3 dedicated for mysql, one for inserts, and 2 replications for selects, yeah just buying more servers will help, but again, i wanna ask how the people do the real time activity checks in their dynamic website, like social networks etc, maybe i am doing it wrong..

Thanks, regards natz.

Re: mysql query's just on page load

Posted: Sat Apr 03, 2010 11:47 am
by Christopher
Sounds like it is at least time to do some caching of results or maybe use memcached for some things.

Re: mysql query's just on page load

Posted: Sat Apr 03, 2010 12:06 pm
by natz
Christopher wrote:Sounds like it is at least time to do some caching of results or maybe use memcached for some things.
Sorry for being such a dumb but can you explain some example or some technique?
Thanks :?