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

Consider routing all express path queries over unique indexes to the same document iterator

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Optimization

      We should consider reworking the IdLookupViaIndex iterator being introduced in SERVER-83760 to add support for non-_id, unique indexes. It makes sense to separate this case from the non-unique index case because the unique index iterator should be simpler (can use SortedDataIndexAccessMethod::findSingle() to look up the matching record, does not need to support getting a "next" record if shard filtering filters a document out, etc).


      It might be hard to support all unique indexes in the fastest code path (saw some complications relating to collation and/or dotted paths during SERVER-86237). These more complicated cases can use the more general iterator instead.

            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            hana.pearlman@mongodb.com Hana Pearlman
            0 Vote for this issue
            4 Start watching this issue