MCPcopy Index your code
hub / github.com/dbcli/pgcli / calculate_planner_estimate

Method calculate_planner_estimate

pgcli/pyev.py:94–109  ·  view source on GitHub ↗
(self, plan)

Source from the content-addressed store, hash-verified

92 return v
93
94 def calculate_planner_estimate(self, plan):
95 plan["Planner Row Estimate Factor"] = 0
96 plan["Planner Row Estimate Direction"] = "Under"
97
98 if plan["Plan Rows"] == plan["Actual Rows"]:
99 return plan
100
101 if plan["Plan Rows"] != 0:
102 plan["Planner Row Estimate Factor"] = plan["Actual Rows"] / plan["Plan Rows"]
103
104 if plan["Planner Row Estimate Factor"] < 10:
105 plan["Planner Row Estimate Factor"] = 0
106 plan["Planner Row Estimate Direction"] = "Over"
107 if plan["Actual Rows"] != 0:
108 plan["Planner Row Estimate Factor"] = plan["Plan Rows"] / plan["Actual Rows"]
109 return plan
110
111 #
112 def calculate_actuals(self, plan):

Callers 1

process_planMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected