The order in the SQL statement does not matter, of course, not for indexes that do not cover indexes (more than one column).
Coverage indexes require the query to contain a link for at least one column, starting from the left side of the list. IE: The coverage index, defined as "column1, column2, column3", requires at least queries to reference column1 in order to use the index. A query that has only references to column2 or a combination of column2 and column3 will not use the coverage index.
However, optimizer optimization decisions are determined by table statistics and how the index is fragmented during the query. None of them support self-service, because depending on the amount of data it can take a very long time (so you would not want this to happen all the time). Having an index does not guarantee that the index will always be used.
Indexes are also not ANSI, but surprisingly providers (MySQL, Oracle, etc.) have relatively similar syntax and naming conventions.
source share