The latest distribution (12/10A) includes a significant performance improvement in search.php that removes the need to perform a second table scanning SQL query in order to obtain the total number of results.
To incorporate this feature into an existing site, first use your text editor to perform the following Search and Replace operation against your search.php:
Search:
SELECT * , MIN( price )
Replace:
SELECT SQL_CALC_FOUND_ROWS * , MIN( price )
(4 instances, at lines 93, 104, 157 and 196 of the 11/09A distribution)
Next, look for the following code beginning at around line 213:
database_querySelect($sqlResultCount,$rows);
$resultCount = $rows[0]["resultcount"];
...and REPLACE with:
$numRows = database_querySelect($sql,$rows);
$sqlResultCount = "SELECT FOUND_ROWS() as resultcount";
database_querySelect($sqlResultCount,$rowsResultCount);
$resultCount = $rowsResultCount[0]["resultcount"];
Finally, look for the following code beginning at around line 264:
$searchresults["numRows"] = database_querySelect($sql,$rows);
...and REPLACE with:
$searchresults["numRows"] = $numRows;