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

Resolve planCacheKey clashes between DISTINCT_SCAN plans

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • Fully Compatible
    • QO 2025-01-20
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Certain uses of DISTINCT_SCAN plans clash to the same plan cache key between each other and/or other similar find queries. 
      Notable cases include:

      1. distinct('x', filter) and find(filter) and vice versa
      2. distinct('x', filter) and distinct('y', filter) with indexes x_1 and y_1. 

      Use of a cached plan with the same planCacheKey leads to inefficient execution, but correct results. 

            Assignee:
            daniel.segel@mongodb.com Daniel Segel
            Reporter:
            daniel.segel@mongodb.com Daniel Segel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None