Codify INLJ eligible index reads to prevent duplicate work

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently there are 2 functions to extract eligible INLJ indexes - extractINLJEligibleIndexes which operates over a mapping of CanonicalQuery to QuerySolution and extractINLJEligibleIndexesFromGraph(and after SERVER-130368) which operates on the join graph.

      extractINLJEligibleIndexesFromGraph is currently used in the case where we have a plan cache hit to rebuild the index state of the cached plan, and after SERVER-130368, will also be used to compute the node fingerprint during plan cache insertion.

      extractINLJEligibleIndexes is currently used to determine the set of eligible indexes and pass it to the plan enumerator.

      Both of them functionally, read all index entries from the catalog and then iterate over a data structure (join graph of CQ to query solution map) and see if any of the indexes are eligible.

      We should determine whether these 2 functions are equivalent (which would also mean proving that operating over the join graph provides the same information as operating over the CQ->QuerySolution map). If so, we should only do 1 determination of the eligible indexes and plumb it through everywhere rather than maintaining 2 separate functions and 2 instances of this information.

            Assignee:
            Naafiyan Ahmed
            Reporter:
            Naafiyan Ahmed
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: