If I make an index on 2 decimal columns col1, col2, what kind of lookups have I made faster?
Intuitively, it can satisfy exact matches on both columns and works on a where col1... and doesnt work at all for where col2 .... And also range searches on col1 but not on col2; and range searches on col2 given col1.
What is the correct answer?
It will be fater for condition
or for just
where col1=(something)It will not use this index for
For Range searches, it will be faster only for col1, as col1 is in the left most in the index