Speedy: ORDER BY RAND() operation
What can be done to make the following query run faster?
file_id is the primary key on the table (index)
I have several records in the database. And, this query is just not efficient. I want to draw random files, but ORDER BY is not good here.
# Random playlist
REPLACE(file_path, 'P:/', '') `location`
There is an interesting post on similar topic on Anton Titov. Stil my problem cannot be solved. I cannot generate the list of random file_ids randomly in PHP, because, they may not exist or, filtered within WHERE condition.
Thank you in advance for a good suggestion.