EchoFool Posted March 24, 2010 Share Posted March 24, 2010 Hi, Was just enquiring if orderby rand() was efficient and "truely" random. As PHP has rand() and a faster mt_rand which is why i ask if MYSQL has any faster rand version? Also is MYSQL the best use for less server load for random row selection compared to putting rows in arrays and then randomly select the row from the array? Quote Link to comment https://forums.phpfreaks.com/topic/196419-msql-rand/ Share on other sites More sharing options...
o3d Posted March 24, 2010 Share Posted March 24, 2010 RAND() is not meant to be a perfect random generator, but instead is a fast way to generate ad hoc random numbers which is portable between platforms for the same MySQL version. http://dev.mysql.com/doc/refman/5.0/en/mathematical-functions.html#function_rand Quote Link to comment https://forums.phpfreaks.com/topic/196419-msql-rand/#findComment-1031336 Share on other sites More sharing options...
EchoFool Posted March 25, 2010 Author Share Posted March 25, 2010 Is there much point in using any thing other than rand if its just choosing between 15 rows? Quote Link to comment https://forums.phpfreaks.com/topic/196419-msql-rand/#findComment-1031386 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.