| 135 | return plan |
| 136 | |
| 137 | def calculate_maximums(self, plan): |
| 138 | if not self.explain.get("Max Rows"): |
| 139 | self.explain["Max Rows"] = plan["Actual Rows"] |
| 140 | elif self.explain.get("Max Rows") < plan["Actual Rows"]: |
| 141 | self.explain["Max Rows"] = plan["Actual Rows"] |
| 142 | |
| 143 | if not self.explain.get("Max Cost"): |
| 144 | self.explain["Max Cost"] = plan["Actual Cost"] |
| 145 | elif self.explain.get("Max Cost") < plan["Actual Cost"]: |
| 146 | self.explain["Max Cost"] = plan["Actual Cost"] |
| 147 | |
| 148 | if not self.explain.get("Max Duration"): |
| 149 | self.explain["Max Duration"] = plan["Actual Duration"] |
| 150 | elif self.explain.get("Max Duration") < plan["Actual Duration"]: |
| 151 | self.explain["Max Duration"] = plan["Actual Duration"] |
| 152 | |
| 153 | if not self.explain.get("Total Cost"): |
| 154 | self.explain["Total Cost"] = plan["Actual Cost"] |
| 155 | elif self.explain.get("Total Cost") < plan["Actual Cost"]: |
| 156 | self.explain["Total Cost"] = plan["Actual Cost"] |
| 157 | |
| 158 | # |
| 159 | def duration_to_string(self, value): |