Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-83414

[CQF] Design how histogram CE interacts with parameterized queries

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Optimization

    Description

      When parameterization is enabled in CQF, the intervals generated in SargableNodes are no-longer guaranteed to have constant bounds, they will be expressions. While we do maintain a mapping of parameter ID to constant in the given query, simply replacing references to parameters with constants is not sufficient, we'd need to invoke constant folding to get back a set of intervals with constant bounds. Doing so would require copying an ABT with potentially large constants in it, which may have performance implications; since we don't have to mutate the ABT that CE is given, since that get inserted into the memo.

      This ticket is a placeholder for work to design and implement a solution to this problem. One idea: disable interval simplification in SargableNode and estimate the CE of all predicates independently; this would allow direct replacement of parameter markers for their constant values.

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: