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)
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.
- log messages
- possibly regarding:
plan cache filter
- analyzing mongodb perf