View Single Post
Old 11-14-2007, 06:38 PM   #5 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

Quote:
Originally Posted by wGEric View Post
Reduce the number of SQL queries you execute on each page load. Every SQL query is a call to the SQL server which takes some time.
Just to elaborate on this valid point. It's better to have 10 small and quick queries instead of 1 big and slow query. Also, in your SQL queries, use the EXPLAIN command before SELECT and then analyse the results. You'll want to stay well away from ALL queries as this means that MySQL has had to scan the entire table (or more) to find what it's looking for. See this page in MySQL's documentation for further information.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote