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

Better query planning for choosing columnstore index vs collscan

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • QE 2022-11-14, QE 2022-11-28, QE 2022-12-12
    • 100

      Right now the columnstore index is used any time it is available and a collection scan would have been used instead. With our current implementation, there are cases where the column scan is significantly worse than a collection scan. For example, when the collection is small and fits entirely in memory, or when the documents are extremely small (<1kb). We expect the collection scan to beat the column scan in these cases now, and probably in the future.

       

      This task is to determine (a) Should we do anything during query planning about this? Should we use our estimates of the collection's size and number of records to guess which plan is better?

      If yes for (a), how should we decide between the two? A simple query knob "cutoff" value? Or something fancier?

            Assignee:
            alyssa.clark@mongodb.com Alyssa Clark
            Reporter:
            ian.boros@mongodb.com Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: