
03-22-10, 11:22
|
|
vaguely human
|
|
Join Date: Jun 2007
Location: London
Posts: 2,517
|
|
Quote:
Originally Posted by mmcknight
As for optimizing the speed of the query did you recommend anything you haven't already wrote about?
|
I'd do the following: - store the main image in the listings table
- then remove the join to the images table
- then remove the group by clause
- have a PHP function to clean the form parameters ie
Code:
$id = clean_parameter( "uniqueid" );
- then alter the SQL comparison on uniqueid to ( '$id' = '' or c1 = '$id' )
- put a limit on the number of rows returned ie limit 20
- alter the field names from c1..c9 (actually I'd do this first)
|
|