-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
SERVER-113143 adds a query on the config.placementHistory collection on the config server with this pipeline:
[
{$match: {timestamp: {$gt: ts}, nss: matchExpression}},
{$sort: {timestamp: -1}},
{$limit: 1},
{$project: {timestamp: 1}}
]
ts has a dynamic value, and matchExpression is one of:
- {$ne: ""}
- {$regex: "^dbName(\..*")?$}
- {$regex: "^dbName(\.collName)?$}
The index present on config.placementHistory currently is nss_1_timestamp_-1, which likely means that it needs to scan more index than strictly necessary to find the closest placement history entry.
This assumption should be verified, and if accurate, we should try to limit the amount of index entries this query needs to read from the placement history by adding another index or rephrasing the query.
- is related to
-
SERVER-113143 Add support for openCursorAt and nextPlacementChanged return fields
-
- Closed
-