Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-17651

Lazily generate CanonicalQuery plan cache key

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:

      CanonicalQuery generates the plan cache key for the underlying query in the CanonicalQuery::init(). This is an expensive operation that is performed unnecessarily for CanonicalQuery objects that never have their plan cache key examined (see example in exec/sort.cpp).

      Instead, plan cache key generation should happen lazily on the first call to CanonicalQuery::getPlanCacheKey(). The first call to this method should save the generated cache key in the _cacheKey member variable for later retrieval.

            Assignee:
            Unassigned Unassigned
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: