-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
QO 2021-10-18, QO 2021-11-01, QO 2021-11-15, QO 2021-11-29
This is an expensive call which reconstructs a full PlanStats tree. However, we only need a single metric from this tree which represents a total number of storage reads performed during PlanStage tree execution and computed with calculateNumberOfReads().
However, it seems there is a cheaper way to get this number. We can use accumulate() to populate a PlanSummaryStats instance off the PlanStage's common stats without constructing a PlanStats tree. Then we can sum up totalKeysExamined and totalDocsExamined to get the total number of storage reads.