Ron Piggott wrote:
Is there a way to optimize this with better mySQL query?

Step 1 - work out which bit is slow.

$start_time = time();
mysql_query (....)

echo "That took " . (time() - $start_time) . " seconds<br/>\n";

I'd guess the first one is slow because of the order by random()

but that's just a guess.

Postgresql & php tutorials

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to