Given this SQL:
SELECT * FROM mytable ORDER BY mycolumn, RAND()
Assuming that mycolumn happens to only contain unique values (and hence, contains enough information to perform the ORDER BY), does MySQL short-circuit the operation and skip evaluating the rest?
I think this is the answer. Mysql uses different plans and can’t perform lazy evaluation (o “hort-circuit”).