For a query that uses ALL columns of a composite b-tree index
SELECT * from customers where gender = 'M' AND date_of_birth < '2000-01-01'
Is there a difference between
CREATE INDEX low_then_high ON customer (gender, date_of_birth);
CREATE INDEX high_then_low ON customer (date_of_birth, gender);
A similar question is How to pair low/high cardinality columns as composite indexes? but the accepted answer did not explain the reason behind the recommendation.
I am asking about MySQL but I'm guessing that the answer would apply to any b-tree index.