-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
20
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 may exist several indexes that have the field as a prefix (can be multikey), and we pick the one with the fewest number of fields
- Limit 1 or the index has exactly one field and is unique
- Shard filtering is not supported unless we are using the unique index described above (see SERVER-87016).
- 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.
- is depended on by
-
SERVER-87016 Extend express path to support findOne queries with non-unique indexes that require shard filtering
- Open
-
SERVER-87082 Query fast path for indexed single equalities in update or delete
- Backlog
- is related to
-
SERVER-87148 Consider routing all express path queries over unique indexes to the same document iterator
- Backlog
-
SERVER-87210 Extend express path to support simple projections for single-field equality queries
- Backlog