-
Type: New Feature
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Diagnostics
-
None
-
Query
Currently, the only way for clients to access query diagnostics is through the explain command; there's no way to access that information when issuing normal queries. We'd like to introduce a flag to find (and potentially other query commands) that includes some basic diagnostic information (keysExamined, docsExamined, hasSortStage, and ideally planSummary) as part of the query response. This enables building smarter clients that have a better understanding of their performance impact.
As an example use case, we'd like background batch job clients to throttle themselves based on the load they generate on the database. In theory we could use number of queries issued or documents returned, but keysExamined, docsExamined, and hasSortStage are a much more precise indicator of the performance impact of queries.
I put together a quick sketch implementation to demonstrate what the interface might look like.
- duplicates
-
SERVER-1812 Add the ability to get query results and the query plan in one call
- Backlog