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

performance regression with many indexes and few results

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.1.1
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • ALL

      Earlier in the 2.1 development cycle I made a change that requires us to generate all plans for many queries even if an index has been recorded for the relevant query pattern. (All the plans are generated, but only the recorded plan actually gets run.)

      This resulted in a performance regession, which I have measured as follows:

      In current code an optimal index query with nscanned==0 takes about 45% longer when there are 52 indexes than when there are 2 indexes. In 2.0, the corresponding penalty caused by the 50 additional indexes is 10%. (With increasing nscanned/nscannedObjects the total operation time increases and the measured (relative) performance difference diminishes.)

      I think we can pretty easily restore the earlier performance by adding an additional metadata field that gets recorded along with the index for a query pattern.

      The "simple id" mode is not affected by this regression.

            Assignee:
            aaron Aaron Staple
            Reporter:
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: