How can I fetch 10 random values from 50k rows fastly including Inner Joins
Please Reply asap....
Thanks in advance
How can I fetch 10 random values from 50k rows fastly
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Munesh SharmaRank #174 · 13.9K reputationPosted Sep 29, 2014, 10:52 PM EDT
JOIN (SELECT (RAND() * (SELECT MAX(id) FROM random)) AS id)
AS r2
WHERE r1.id >= r2.id ORDER BY r1.id ASC LIMIT 1
or go on this link
http://jan.kneschke.de/projects/mysql/order-by-rand/
Vinod Sharma154 reputationPosted Sep 29, 2014, 11:30 PM EDT