Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12781

[Server] Document that explain neither reads from nor writes to the plan cache

      Description

      When users run an explain of any command (find, aggregate, update, etc.), the plan cache is not used. Instead, the set of candidate plans are generated and a winner chosen without ever consulting the plan cache as described here: https://docs.mongodb.com/manual/core/query-plans/. Furthermore, no plan cache entry is created for the winning plan. We should document this behavior.

      This is a common source of user questions and confusion, because when a cache entry is present it can cause users to observe a discrepancy in the plans selected by explain and the plans selected without explain. SERVER-16895 is an open request to allow users to run explain in a mode which read a plan out of the plan cache, but this improvement is not currently scheduled for development.

      Scope of changes

       

            Assignee:
            caleb.thompson@mongodb.com Caleb Thompson
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:
              5 weeks, 2 days ago