Consider the table supplier
which contains 10,000 records:
memsql> select count(*) from supplier; +----------+ | count(*) | +----------+ | 10000 | +----------+ 1 row in set (0.12 sec)
I can randomly select ~50% of the records in this table using the following query:
memsql> select count(*) from supplier where RAND() < .5; +----------+ | count(*) | +----------+ | 5071 | +----------+ 1 row in set (0.00 sec)
I can randomly select ~10% of the records in this table using the following query:
memsql> select count(*) from supplier where RAND() < .1; +----------+ | count(*) | +----------+ | 975 | +----------+ 1 row in set (0.00 sec)