MessageAccording to http://www.mysql.com/doc/D/I/DISTINCT_optimisation.html, DISTINCT is converted to a GROUP BY on all columns, DISTINCT combined with ORDER BY will in many cases also need a temporary table.
Instead of using DISTINCT, consider adding GROUP BY for all the columns except ID. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php