Closed aleksandra-kim closed 6 years ago
Original report by Chris Mutel (Bitbucket: cmutel, GitHub: cmutel).
Using order by ? takes a while, as SQLite has to order all rows, especially at startup. Better to leave ordering undefined, but still leave a iteration randomly ordered. So just need to change .random(), but check this!
order by ?
.random()
See also: http://stackoverflow.com/questions/4114940/select-random-rows-in-sqlite
Original comment by Chris Mutel (Bitbucket: cmutel, GitHub: cmutel).
Fix #47. Improve performance of 'random' by faking it
Original report by Chris Mutel (Bitbucket: cmutel, GitHub: cmutel).
Using
order by ?
takes a while, as SQLite has to order all rows, especially at startup. Better to leave ordering undefined, but still leave a iteration randomly ordered. So just need to change.random()
, but check this!See also: http://stackoverflow.com/questions/4114940/select-random-rows-in-sqlite