Say I have a table, table1 with and index on field1,2,3
If I query this table with a query similar to this:
and field2 =ccc
I have listed all fields in the index in my where clause, but I didn't hit them in the order they're listed in the index. Will my index be used? Will is increase the speed of my query if I hit the fields of the index in order?
And I'd like to know if I join this table to another using the index, would I have to join the table listing the fields in the index in order also.
Select otherTable.*, table1.field4
join table1 on (othertable.x = table1.field1 and othertable.y=table1.field2 and othertable.y = table1.field3)
... or will just listing the fields in the index in any order work ( as long as I list the first field in the index first?)