0

I've been trying to answer my problem, but all the answers here on the site are always the same as my request.

I would like to show a random content from a database list, but the various responses are always those to use: ORDER BY rand() LIMIT 1

Now everyone says that rand () waste too much resources, but then I wondered what the most convenient way to extract random content from the database?

PS: I do not want to be banned for opening a request for the usual speech, because in my request I only ask for the definitive method, and not the usual rand () that they propose. It can serve many.

Thank you

Marco
  • 37
  • 1
  • 10
  • 3
    This is the most convenient method. Perhaps you need to reconsider your definition of 'convenience' – Strawberry Jul 06 '17 at 08:55
  • Welcome! You've probably heard that Stack Overflow regulars are a bunch of elitist pedants who ask for error messages and log files with the sole purpose of annoying people (that part is entirely true) but nobody is getting banned for posting questions unless (I guess) the question tries to sell Viagra. In any case, the [very first question](https://stackoverflow.com/questions/4329396/mysql-select-10-random-rows-from-600k-rows-fast) I've found has 26 answers with a variety of solutions, not just `ORDER BY rand() LIMIT 1`. – Álvaro González Jul 06 '17 at 09:06

0 Answers0