In getExecutorDistinct(), we use the function turnIxscanIntoDistinctIxscan() to convert an IXSCAN into a DISTINCT_SCAN in a QuerySolution where possible. It only applies to solutions with a PROJECTION as the root, and an IXSCAN as its child. This will not apply to indexes with non-simple collation, because there the IXSCAN stage is always followed by a FETCH stage. It should be possible to convert the IXSCAN into a DISTINCT_SCAN for an index with a non-simple collation anywhere that it is possible for an index with a simple collation.
- related to
-
SERVER-28952 Multikey indexes should not be eligible for DISTINCT_SCAN if distinct key is an array component
- Closed