Imagine a sql table with a very high number of rows (for example 300 million of rows).
Each row have an text field and I'd like to retrieve 10 rows randomly.
The problem is that using
select key from the_table where enabled=1 order by rand() limit 10
Calculate the rand value and order all the rows by that value is a very high load.
Is there some way for avoiding that?