本文介绍了通过rand mysql替换订单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
order by rand
是否有等效项?
推荐答案
虽然@Sandro的链接解释了ORDER BY RAND()
不好的原因,但没有给出真正的解决方案.
While link from @Sandro explains why ORDER BY RAND()
is bad, it gives no real solutions.
您应该尝试阅读本文.而且,如果它太枯燥",或者您想了解有关SQL的更多信息,则应该查找 SQL Antipatters 本书,或至少仔细浏览作者幻灯片.
You should try reading this articles. And if it is too "dry", or you want to learn more about SQL, then you should look up SQL Antipatters book, or at least carefully look through authors slides.
这篇关于通过rand mysql替换订单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!