On the choice of fields by federated index

if there are three fields in the table: id, date, gender
if sometimes the query is (id, date, gender)
, sometimes the query is (id, gender)
is it possible to create a (id, date) joint index
because gender is not highly differentiated
does not need to be part of the index
where id=3 and date="2018-06-23 "and gender=0
where id=3 and gender=0
can you use this joint index
?

May.26,2022

Yes, you can all use this federated index

if the select field of the query has only (id, date, gender) , establishing a joint index of id, date, gender can avoid returning to the table, and the performance is better.

Menu