public class TransformDistinctToReduced extends TransformCopy
Transforms generic DISTINCT plus ORDER BY combinations to
REDUCED plus ORDER BY which typically gives better
performance and memory consumption because engines have to keep less data
in-memory to evaluate it.
See also TransformOrderByDistinctAppplication which is a better
optimization for these kinds of queries but only applies to a limited
range of queries. Where possible that optimization is applied in preference
to this one.
TransformTopN covers the case of DISTINCT plus
ORDER BY where there is also a LIMIT. Where possible that
optimization is applied in preference to either this or
TransformOrderByDistinctAppplication.
COPY_ALWAYS, COPY_ONLY_ON_CHANGE| Constructor and Description |
|---|
TransformDistinctToReduced() |
| Modifier and Type | Method and Description |
|---|---|
Op |
transform(OpDistinct opDistinct,
Op subOp) |
transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transformpublic Op transform(OpDistinct opDistinct, Op subOp)
transform in interface Transformtransform in class TransformCopyLicenced under the Apache License, Version 2.0