If I have a query in a table:
SELECT * FROM clientes WHERE empresa_id=10 AND datacad='2017-01-01'
And two indexes, one in the 'empresa_id'
column and the other in 'datacad'
.
Will MySQL use only one of the two, or is it able to use both?
Would it be better to create an index 'empresa_id, datacad'
?