Another alternative for randomly ordering data with MySQL
Posted February 24th, 2010 in MySql
This time last week I mentioned I had another solution to pulling records out of a table at random with MySQL (compared with ORDER BY RAND() and LIMIT). However I've had some issues with the actual "randomnesss" where it seems to favour a particular set of records so have had to postphone the article and will post it when I've ironed the wrinkles out.
I'll repost this page again with the results if and when I manage to make it work as intended. The post is already written; I just found some issues when running 1000 lots of the query and counting results on a test table.
Related posts:
- MySQL's LIMIT syntax can be slow for large offsets (Wednesday, February 17th 2010)
- An alternative to ORDER BY RAND() for MySQL (Wednesday, February 3rd 2010)
- Randomly ordering a MySQL result set (Wednesday, March 18th 2009)

Comments
blog comments powered by Disqus