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

Consider removing optimize call from $expr rewriter

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Optimization
    • QO 2023-11-27, QO 2023-12-11, QO 2023-12-25, QO 2024-01-08

      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.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            alexander.ignatyev@mongodb.com Alexander Ignatyev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: