[Markov module] Try using 'ORDER BY random()' for initial selection instead of two queries (COUNT(*) / SELECT)