MySQL/MariaDB has log_queries_not_using_indexes enabled and this query shows in the log:
SELECT * FROM `client` WHERE 1 ORDER BY `code` ASC;
The client table has a BTREE index defined with the code column. I'm curious why it wasn't used. I understand indexes can still be used with simple ordering.
Is the index not used because of the WHERE 1 clause in the query? Or is using an index simply not necessary with a simple query like that?
This is academic for me, the query runs fast already.