
Show HN: SQLite ORDER BY RANDOM() frequency tester - drumnix
https://github.com/attogram/random-sqlite-test
======
drumnix
Working demo:
[http://fosiper.com/random/sqlite/](http://fosiper.com/random/sqlite/)

~~~
artpar
It is interesting to note the randomness, but shouldn't we avoid "order by
rand()" clauses, or is there a good use case?

[https://stackoverflow.com/questions/8200189/select-random-
ro...](https://stackoverflow.com/questions/8200189/select-random-row-from-sql-
using-php/8200193#8200193)

ps, not a php specific question/answer

~~~
drumnix
Yes, this tester really shows how slow ORDER BY RANDOM() is on larger tables.
Because of this, the tester code is now updated with an internal time limit,
so it won't overload servers.

