11-14-2007, 06:38 PM
|
#5 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
Quote:
Originally Posted by wGEric
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.
|
|
|