| 125 | return plan |
| 126 | |
| 127 | def calculate_outlier_nodes(self, plan): |
| 128 | plan["Costliest"] = plan["Actual Cost"] == self.explain["Max Cost"] |
| 129 | plan["Largest"] = plan["Actual Rows"] == self.explain["Max Rows"] |
| 130 | plan["Slowest"] = plan["Actual Duration"] == self.explain["Max Duration"] |
| 131 | |
| 132 | for index in range(len(plan.get("Plans", []))): |
| 133 | _plan = plan["Plans"][index] |
| 134 | plan["Plans"][index] = self.calculate_outlier_nodes(_plan) |
| 135 | return plan |
| 136 | |
| 137 | def calculate_maximums(self, plan): |
| 138 | if not self.explain.get("Max Rows"): |