SERVER-136737ClosedFixed
Record baseline metrics and implement cache-eligibility gate for join plan cache entry
When inserting an entry into the join plan cache, the plan cache will execute the first batch of the plan and measure the total num of reads by the leaf stages and total number of intermediate rows produced by the join operators as well as tracking spilling. This will be used to make a decision on (1) whether the query is worth caching (the goal is to cache "fast" queries only where optimization time is significant relative to execution time) and (2) whether to replan on cache hits