[DOCS-11982] Docs for SERVER-36528: Implement $planCacheStats aggregation metadata source Created: 22/Aug/18  Updated: 13/Nov/23  Resolved: 11/Feb/19

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: 4.1.3, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-36528 Implement $planCacheStats aggregation... Closed
Duplicate
Related
related to DOCS-12387 Docs for SERVER-33303: Modifying inde... Closed
is related to DOCS-11959 Docs for SERVER-36527: Include queryH... Closed
is related to DOCS-11962 Docs for SERVER-35981: Include hash o... Closed
is related to DOCS-11965 Docs for SERVER-23332: Expose query p... Closed
Participants:
Days since reply: 5 years, 2 days ago
Epic Link: DOCS: 4.2 Server/Tools

 Description   

----------------------------

Original Description

Description:

This is a new aggregation stage which needs to be documented in the manual. The details are available in the scope for this project: https://docs.google.com/document/d/1imZ9_BNJUEbBupGEg0JuMDSwHdGkCM8br85CDEkJYqU/edit. Either Storch or Ian Boros are available for questions and to review any docs changes.

{$planCacheStats: {}} can be added at the beginning of an aggregation pipeline. The resulting cursor will return one document per plan cache entry for the collection over which the aggregation is issued. The format in which the plan cache entry is represented differs from that of the 'planCacheListPlans' command, but the information available is similar. This is useful for debugging/diagnosis when the plan cache is suspected as involved in a query performance issue.

Users should typically prefer $planCacheStats over the 'planCacheListPlans' and 'planCacheListQueryShapes' commands. We may want to add a note about this on the docs pages for those commands.

It may be valuable to show an example in which a $planCacheStats stage with a subsequent $match on 'queryHash' is used to lookup information for a particular cache entry.

If auth is enabled, reading the plan cache requires the 'planCacheRead' action type on the collection.

----------------------------

Description

Scope of changes (files that need work and how much)

  • 4.2.txt
  • planCacheStats
  • query-plans
  • Security: privilege-actions
  • restrictions:
    • facets
    • as part of txn operations (txn operations, aggregation command/method)
    • local read concern -> causal consistent session
  • Preference over existing
    • planCacheListPlans/planCacheListQueryShapes/PlanCache.listQueryShapes/PlanCache.getPlansByQuery
  • Add references to new stage
    • explain
    • index-partial
    • measure-index-use

Impact to other docs outside of this product

MVP (work and date?)

Resources (e.g. Scope Docs, Invision)



 Comments   
Comment by Githook User [ 11/Feb/19 ]

Author:

{'name': 'Kay Kim', 'email': 'kay.kim@mongodb.com'}

Message: DOCS-11982: planCacheStats agg stage
Branch: master
https://github.com/mongodb/docs/commit/5c21d4c0bd7a616d2ee739787f17533078818e15

Generated at Thu Feb 08 08:04:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.