When LIMIT 9 works but LIMIT 10 hangs
Wait, what?  order by random()

Does that even make sense? Why would anyone ever need this? Better to order by a stored value and randomize the presentation order, IMO.Seems completely dependent on when random() gets evaluated. If it gets evaluated at every inspection of the row during the sort, I'm little amazed that it hangs some times.