-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
QO 2024-02-05, QO 2024-02-19, QO 2024-03-04, QO 2024-03-18, QO 2024-04-01, QO 2024-04-15, QO 2024-04-29
Often we will sort the BSON elements of a $in list early in query processing. Sorting BSON elements is usually fairly slow, and for short running query, this takes a significant amount of the runtime.
Sometimes, this $in list gets converted to KeyStrings, which are used for index bounds. KeyStrings are very easy/fast to compare, so we should try to delay the sorting of the $in list elements until after the KeyStrings are generated.
This will not be possible in all cases, but should be a minor perf win for $in queries that get answered with ixscan/fetch plans. For example, a query that fetches a bunch of documents via a $in on _id.
- depends on
-
SERVER-85775 Make InListData sort and dedup lazily
- Closed