ORDER BY RAND() in a sql query randomizes by all table rows before returning a result, which is costly. Use mt_rand() instead: http://php.net/manual/en/function.mt-rand.php

Comments

torgospizza’s picture

Status: Active » Postponed

I'm trying to think of a way to implement this, but can't. We need multiple results, arranged randomly. I think the best way might just be to limit the query and then use array_rand() to randomize the final results. Postponing for now.