Postponed
Project:
UC Upsell
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2010 at 03:24 UTC
Updated:
2 Aug 2010 at 01:45 UTC
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
Comment #1
torgospizzaI'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.