WHERE person_id = 123 AND country_code = 'AT'
Use
INDEX(person_id, country_code) -- in EITHER order!
There is no difference in speed or space for the order of the index columns in this case.
Yeah, MyISAM had "index compression", but that is not used anymore.
Cardinality only matters for comparing separate indexes, not for ordering columns in a composite index. That is,
INDEX(person_id) -- is better than
INDEX(country_code)
But neither is as good as the composite index.
For
WHERE person_name LIKE 'James%' AND country_code = 'UK'
the best index is
INDEX(country_code, person_name) -- in THIS order!
The order in the WHERE
has no impact on optimization.
More tips and discussion: http://mysql.rjweb.org/doc.php/index_cookbook_mysql