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

Implement timeseries bounded sort optimization to use planning information instead of runtime information

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Execution

    Description

      Currently timeseries bounded sort optimization is implemented after we already created an execution plan: https://github.com/mongodb/mongo/blob/6f450a3cea6287612329f44e90536d72fe7c16c5/src/mongo/db/pipeline/pipeline_d.cpp#L1225 

      Because of this, to decide if we can do this optimization, we have to introspect PlanExecutorImpl and extract runtime information, such as sort order provided by the query, in a complex way, instead of using query planning interface, provided by QuerySolution.

      This also makes the code fragile.
      For example, implementing exclusion projection pushdown (SERVER-61284) breaks the code, because it doesn't support PROJECTION_* nodes as root of query execution tree.

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            ivan.fefer@mongodb.com Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated: