Comments - Data Sampling: Techniques for Efficiently Finding a Random Row

3 years, 3 months ago Darcey Lloyd

1. Get no' of rows in table 2. Gen rand number(s) between 1 and no of rows (no duplicates) 3. Return row(s)

No sorting should be required, why would that even be an idea? Amazing that these are still the solutions in use... Should have been internal feature long ago.

Just add SELECTRAND * FROM xyz WHERE x = y LIMIT 10 etc

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.