Optimizing PHP Code
View Single Post
11-14-2007, 06:38 PM
La Vida es Sueño
Join Date: Sep 2007
Originally Posted by
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
and then analyse the results. You'll want to stay well away from
queries as this means that MySQL has had to scan the
table (or more) to find what it's looking for. See
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.
View Public Profile
Send a private message to Wildhoney
Visit Wildhoney's homepage!
Find More Posts by Wildhoney