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

Consider removing optimize call from $expr rewriter

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Optimization
    • QO 2023-11-27, QO 2023-12-11, QO 2023-12-25, QO 2024-01-08

    Description

      ExprMatchExpression's optimizer in ExprMatchExpression::getOptimizer() function first calls $expr rewriter to rewrite its child expression and then calls optimize() on a new expression which includes the rewritten expression.

      The $expr rewriter calls optimize() on the rewritten expression as well.

      One of the two calls seems to be redundant, please consider if one the calls can be safely removed.

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            alexander.ignatyev@mongodb.com Alexander Ignatyev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: