[SERVER-81589] [CQF] Avoid optimizer round-trip for lowering of SargableNode for sampling queries Created: 29/Sep/23  Updated: 18/Jan/24  Resolved: 16/Jan/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: New Feature Priority: Major - P3
Reporter: Svilen Mihaylov (Inactive) Assignee: Chi-I Huang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-80732 [CQF] Improve SamplingPlanExtractor t... Closed
Duplicate
is duplicated by SERVER-80732 [CQF] Improve SamplingPlanExtractor t... Closed
Related
related to SERVER-84713 Ensure the child of a SargableNode is... Open
Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Participants:

 Description   
  • For sargable nodes, iterate over residual requirements, and lower using “lowerPartialSchemaRequirement”
  • This generates filters and eval nodes.
  • Insert a physical scan node using scan params.
  • Basically copy and refactor segment of handler for SargableNode in implementers.cpp with target = Complete


 Comments   
Comment by Githook User [ 18/Jan/24 ]

Author:

{'name': 'David Percy', 'email': 'david.percy@mongodb.com', 'username': 'dpercy'}

Message: SERVER-83757 [CQF] Add missing properties in sampling ImplementationVisitor.

In a previous ticket SERVER-81589 we introduced this
ImplementationVisitor to avoid using OptPhaseManager for sampling
queries. It's responsible for producing a physical plan, and associated
properties in _propsMap. However we were missing a map entry for the
LimitSkipNode.

GitOrigin-RevId: bd0a5cdba6720cac56d60b4f5848ac13166789df
Branch: master
https://github.com/mongodb/mongo/commit/ba9c9d09055eb5a0b07b12c0755e9d6ce5dc43d9

Comment by Githook User [ 16/Jan/24 ]

Author:

{'name': 'Chi-I Huang', 'email': '8468853+chiihuang@users.noreply.github.com', 'username': 'chiihuang'}

Message: SERVER-81589 Remove optimization round-trip for sampling (#17027)

SERVER-81589 Remove optimization round-trip for sampling SargableNode

Remove optimization round-trip by skipping MemoSubstitutionPhase and
MemoImplementationPhase for SargableNode. Since we skip the
implementation phase, we have a mini-version of SargableNode implementer
that creates a subtree FilterNode(s) - LimitSkipNode - PhyscalScanNode
with field projections.

GitOrigin-RevId: 13ab277322258f5e16eb863ca7cbfd9f4b219b8b
Branch: master
https://github.com/mongodb/mongo/commit/527630e798abca18a9204d63e57afc69713a5801

Generated at Thu Feb 08 06:46:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.