I'm trying to prepare a query for performance. I'm hoping to remove the RAND() from the query below and replace it with a better performing alternative. Does anybody have any suggestions?
SELECT video.*,
video.wins / video.loses AS win_loss_ratio
FROM video
WHERE video.videoid NOT IN (SELECT vidlog.videoid
FROM video AS vid,
video_log AS vidlog
WHERE vid.videoid = vidlog.videoid)
AND video.round = 0
ORDER BY RAND(), win_loss_ratio DESC
LIMIT 0, 2
Thanks!