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

Lazily generate CanonicalQuery plan cache key

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: