In MySQL I have a compound index on 2 fields (a,b). If I'm accessing only field a as part of a query do I still get the benefits of the index?
Thanks
Think of a telephone book. It's basically a sorted index on last_name, first_name.
Does the fact that the telephone book is sorted in that way help you to look up people even if you search only by last name?
Yes, it does.