List:General Discussion« Previous MessageNext Message »
From:Jose de Leon Date:May 4 2000 1:27am
Subject:Order by Random
View as plain text  
select * from mytable order by rand() ;

Is the above statement efficient as it can be or can random ordering be
achieved more efficiently?

I am using MySQL 3.23.14-alpha only because I need the ability to order by
rand() and I noticed documenation claiming to support this feature.

Problem is that it appears to be slow for large tables.  I am only using a
table that is 27,000 records and it took 40 seconds to output.  This table
will grow to about 400,000 records.


Order by RandomJose de Leon4 May
  • Re: Order by Randomsasha4 May