-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
When the most selective conditions in a conjunction are evaluated first, this reduces the likelihood that the subsequent conditions will need to be evaluated at all due to Boolean short-circuit logic. Therefore it is beneficial to order the terms of a conjunction according to their selectivity. This ordering assumes that all terms have approximately equal cost, which is true for all range comparison operations. When some day we will consider expensive predicates the ordering should be done based on the ratio of selectivity and cost (or rank).
Since predicate order is a physical property, and cost is a physical property as well, this reordering should be done during the implementation phase, when logical nodes are implemented via specific physical nodes.
Currently this reordering is performed during the implementation of SargableNode, via the call to function lowerPartialSchemaRequirements().
- depends on
-
SERVER-83441 Pushdown top-level fields from FilterNode into PhysicalScanNode
- Closed
-
SERVER-83839 Implement query-knob guarded logic to skip Sargable rewrites
- Closed
- is depended on by
-
SERVER-83456 Skip Filter->Sargable rewrite for collscan plans
- Closed