"timeOfCreation" field in PlanCacheEntry is actually the time of the last transition to isActive:true

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Query Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There are cases where we overwrite the PlanCacheEntry stored in the cache, creating a new entry with a new "timeOfCreation". This means that the output of planCacheListPlans and $planCacheStats may be confusing. For example, when an inactive cache entry transitions to active, it will get a new "timeOfCreation" value.

      See here:

      https://github.com/mongodb/mongo/blob/7bc9953a256c1fab8b772812e712b909fefc4535/src/mongo/db/query/plan_cache.cpp#L776-L787

            Assignee:
            [DO NOT USE] Backlog - Query Execution
            Reporter:
            Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: