Is there a better way to generate the distinct set of values from the leading edge of a primary key
I have a large table with a mutl-column primary key supported by a B-Tree index. The number of distinct values in the first column is (comparatively) small,
I want to get the set of distinct values at the leading edge of that primary key. The explain plan tells me that Oracle is going to do a HASH (Unique) of an INDEX (Fast Full Scan).
I would think Oracle would have a plan that would use the B-Tree structure to at least limit the set of leaf blocks it needs to look at, rather than having to scan the entire index. An index skip scan seems to know how to navigate around when the leading column changes, I would expect