See the following query:
select a from test where c=10;
Suppose we have a composite index on columns(c,a). Will all the data in this case be retrieved using index without actually referring the base table?
Printable View
See the following query:
select a from test where c=10;
Suppose we have a composite index on columns(c,a). Will all the data in this case be retrieved using index without actually referring the base table?
have you tested it - to try and learn?
As simple 'yes' wouldn't have killed you. I asked it because I was home and it was teasing my mind and I didn't have access to some Oracle Installation. I just tested it. It is Index Fast Full Scan feature.
it actually depends on cardinality ... optimizer may decide or not to rely on index depending on percentaje of rows expected to be retrieved.