Make QueryPlannerParams::NO_TABLE_SCAN allow clustered index COLLSCAN

XMLWordPrintableJSON

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

      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
            Reporter:
            Haley Connelly
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: