(self, sql)
| 148 | return "<fail>" |
| 149 | |
| 150 | def pgsql_query_plan(self, sql): |
| 151 | try: |
| 152 | #success, res = self.execute_sql('explain (FORMAT JSON, analyze) ' + sql) |
| 153 | success, res = self.execute_sql('explain (FORMAT JSON) ' + sql) |
| 154 | if success == 1: |
| 155 | plan = res[0][0][0]['Plan'] |
| 156 | return plan |
| 157 | else: |
| 158 | logging.error('pgsql_query_plan Fails!') |
| 159 | return 0 |
| 160 | except Exception as error: |
| 161 | logging.error('pgsql_query_plan Exception', error) |
| 162 | return 0 |
| 163 | |
| 164 | def pgsql_cost_estimation(self, sql): |
| 165 | try: |
nothing calls this directly
no test coverage detected