index scan is slower than full collection scan in some scenarios

XMLWordPrintableJSON

    • Query Execution
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Tested with WiredTiger which seems to exhibit this more than MMAP.

      Covered index query which has to return all the documents from a collection is slower than just a full collection scan even in cases where index is quite small and collection is very large.

      Looking at where we spend time, it appears for each "document" we need to "synthesize" from the index we allocate and free some memory. We apparently have some optimization for avoiding that in collection scan but not full index scan. This is to track the same optimization for index scan.

        1. Screenshot 2016-04-12 15.51.00.png
          762 kB
          Asya Kamsky
        2. Screenshot 2016-04-12 16.35.16.png
          581 kB
          Asya Kamsky
        3. Screenshot 2016-04-12 17.53.37.png
          482 kB
          Asya Kamsky
        4. Screenshot 2016-04-12 17.53.59.png
          471 kB
          Asya Kamsky
        5. ixscan-flamegraph.svg
          256 kB
          Kyle Suarez
        6. flame-graph-screenshot.png
          177 kB
          Kyle Suarez
        7. flame-graph-screenshot.png
          631 kB
          Kyle Suarez
        8. time-ixscan-vs-collscan.js
          1 kB
          Kyle Suarez

              Assignee:
              [DO NOT USE] Backlog - Query Execution
              Reporter:
              Asya Kamsky
              Votes:
              1 Vote for this issue
              Watchers:
              59 Start watching this issue

                Created:
                Updated:
                Resolved: