Mysql B + Tree implementation

Mysql uses the B + tree to implement indexes. Suppose my main index is of type (name, age, city). Can someone shed some light on how Mysql implements the B + tree on these keys?

My hunch is that it treats the entire tuple as a key, and it treats it as a partial order. For example:

(John, 24, New Jersey) <(John, 24, New York) <(John, 25, New Jersey) <(John, 25, New York)

+5
source share
1 answer

(John, 24, New Jersey) <(John, 24, New York) <(John, 25, New Jersey) <(John, 25, New York)

Yes, therefore it is important in what order you expose columns in a key.

, , , - . age / city, name, . , name, .

+4