Forum Moderators: coopster

Message Too Old, No Replies

php mysql table optimization resources

         

tranceformer

12:57 pm on May 31, 2009 (gmt 0)

10+ Year Member



I have a site that gets banned from servers from time to time due to high server loads in times of heavy traffic.

The problem seems to be an issue with my MySQL databases (improper use of keys, indexes, etc..) The problem can also be the way I open and close connections to MySQL with my php code.

I'd like to learn more about php and particularly MySQL, but the problem I have when researching thru google is that I find tutorials that are TOO basic or manuals that are TOO broad and WAY over my head.

Is there a happy medium where I can learn thru examples about table/query optimization in MySQL...and can walk me thru TESTING queries to see how the changes I make to the table structure improve/worsen the query time/server load?

siMKin

12:15 am on Jun 6, 2009 (gmt 0)

10+ Year Member



There's two elements in your post that contradict each other... you post a specific problem and then go on to say that you want to learn more in general but everything you find with google is too basic or too broad.

You have to decide whether you want to solve this specific problem, or boost your knowlegde to another level.

In the first case you'll need to be more specific, in the latter, basic and broad tutorials are just what you need. Just don't expect to find a tutorial that teaches you everything in just half an hour and solves your problem at the same time. Books are also good; i can recommend the ones from o'reilley

Anyways, to address your problem in specific (but this won't be more then a wild guess, since you didn't give too many details): how are you connecting? Are you using mysql_pconnect by any chance? If so, switch to mysql_connect instead.