So let's say I have a compound index on a table that indexes 4 fields.
create index idx_comp_index
on mytable ( fielda, fieldb, fieldc, fieldd );
If I query that table using all four of those fields in my where clause plus an additional field or two, will the index still be used?
select *
from mytable
where fielda = 'i'
and fieldb = 'love'
and fieldc = 'vim'
and fieldd = 'so'
and fielde = 'much'; -- additional field not indexed