1
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 column 'empresa_id'
and another in 'datacad'
.
Mysql will use only one of the two, or is able to use both?
It would be better to create an index 'empresa_id, datacad'
?
Only empresa_id is index, Where clause does not only work with index
– Sveen