-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
Description
Description:
This introduces the "planCacheKey" field to explain/logger/debug output.
To summarize the difference between planCacheKey and queryHash:
queryHash is "stable" across catalog changes. That is, the "query shape" (and thus, the hash of theh query shape) is derived from the query the user wrote down, and does not depend on any state inside the server. It will not change if you add/drop/change indexes.
planCacheKey is "unstable" across catalog changes. It depends both on the query shape and which indexes are available.
This is slightly confusing even for us so if you have questions definitely slack/email me!(ian.boros/ianb)
Engineering Ticket Description:
According to the documentation:
Index filters exist for the duration of the server process and do not persist after shutdown. MongoDB also provides a command to manually remove filters.
While a given index filter does persist across index creation and drops, its application towards queries does seem to be influenced by such actions.
Scope of changes
- source/reference/explain-results
- profiler
- log messages
- 4.2
- possibly regarding:
plan cache filter- analyzing mongodb perf
- core/query-plans
core/query-optimization- tutorial/evaluate-operation-performance
tutorial/manage-indexes
Impact to Other Docs
MVP (Work and Date)
Resources (Scope or Design Docs, Invision, etc.)
- documents
-
SERVER-33303 Modifying indexes impacts application of index filters
- Closed
- is related to
-
DOCS-11959 Docs for SERVER-36527: Include queryHash in explain output
- Closed
-
DOCS-11962 Docs for SERVER-35981: Include hash of plan cache key in planCacheListShapes and planCacheListPlans
- Closed
-
DOCS-11965 Docs for SERVER-23332: Expose query plan cache key in system.profile entry and query log lines
- Closed
-
DOCS-11982 Docs for SERVER-36528: Implement $planCacheStats aggregation metadata source
- Closed