CPU usage, need some help.
Hi,
I'm having a lot of troubles. Let me explain :
I made a facebook application using PHP/MySQL which allows user to know who from their friends removed them.
It's quite simple, it just records every friendship that a user has, and the next time he comes on the application, it just compares the friends in the DB with the friends he has.
But that's making some problems, because, the users usually have like 200 friends, and right now I only have like 7000 registered users but that's like 1,400,000 entries in my database, and even if I'm on a dedicated server, I'm having problems like timeouts...
I'd like to know how to optimize the mysql default configuration, or even how to optimize my queries...
And by the way, how can I know which queries are taking most time to execute ? :\
Thanks,
Tristan