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

Query fast path for indexed single equality predicates

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      Using the scaffolding of SERVER-83758, we can apply a similar approach for the following queries:

      • Single field equality predicate (can be dotted path)
      • There exists only one index that has that field as a prefix (can be multi-key)
      • Limit 1 or the index is unique
        • This allows us to delay thinking about yielding
      • No sharding
        • Shard filter is a residual filter that would require us to think about yielding
      • No projection
      • No sort
      • No numeric paths

      For queries which fit this description, we can write code to manually perform an index scan + fetch plan by directly calling into the storage APIs, removing the need to construct query execution machinery. These types of plans won't be cached as they are neither classic or SBE plans.

      We can test the effectiveness of this change by looking at the mixed_workloads_genny_rate_limited_high_value and majority_reads10_k_threads_high_value workloads.

      If we find this approach can improve the performance of these query shapes, we can incrementally remove the restrictions described above.

      Attachments

        Activity

          People

            hana.pearlman@mongodb.com Hana Pearlman
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: