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

Make QueryPlannerParams::NO_TABLE_SCAN allow clustered index COLLSCAN

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Optimization

      Currently, QueryPlannerParams::NO_TABLE_SCAN prevents users from scanning over a clustered index via COLLSCAN. Disallowing use of the clustered index can cause a query to fail when it would have otherwise succeeded on a normal collection with the explicit _id index.

      Eg) Helpers::findOne() may opt for NO_TABLE_SCAN if requireIndex=true. On a clustered collection with no other indexes, the operation fails because there are no indexes available for an IXSCAN. The clustered index goes unused. As a temporary fix, Helpers::findOne() can check if the collection is clustered, and set it to default instead if so.

      Goal: A more sustainable solution in the query layer that excuses the NO_TABLE_SCAN restriction when a COLLSCAN can be performed over a clustered index.

            Assignee:
            milena.ivanova@mongodb.com Milena Ivanova
            Reporter:
            haley.connelly@mongodb.com Haley Connelly
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: