3 ms·
If you want quality randomness you can always do some equivalent of ORDER BY RAND() as long as you get a new RAND() for each row. I've Googled around but didn'
by Bootvis 5y ago
If you want quality randomness you can always do some equivalent of ORDER BY RAND() as long as you get a new RAND() for each row.
I've Googled around but didn't find anything about this trick:
You can calculate a score and do something like ORDER BY RAND() * score to bias towards certain rows. This could be useful, e.g. you want to randomly show your most profitable items. The kNN method seems harder to generalize.