Welcome Guest, Not a member yet? Register   Sign In
Pick random result from query.
#5

[eluser]CroNiX[/eluser]
That still uses RAND(). You will be sorry if you run that on a moderately large table. Google "mysql rand()" for a million articles on why this is a huge performance killer. It has to retrieve all results, assign a number to each one, etc, which can literally take minutes depending on the size of the table. Running shuffle() on the result would probably be a lot more efficient.


Messages In This Thread
Pick random result from query. - by El Forum - 02-24-2012, 01:45 PM
Pick random result from query. - by El Forum - 02-24-2012, 02:54 PM
Pick random result from query. - by El Forum - 02-24-2012, 04:03 PM
Pick random result from query. - by El Forum - 02-24-2012, 04:36 PM
Pick random result from query. - by El Forum - 02-24-2012, 04:40 PM
Pick random result from query. - by El Forum - 02-24-2012, 09:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB