def execute_sql(self, *args, **kwargs):
        start_time = time.time()

        try:
            result = super(MeteredPostgresqlExtDatabase, self).execute_sql(*args, **kwargs)
            return result
        finally:
            self.query_count += 1
            # TODO: there is a noticeable few ms discrepancy between the duration here and the one calculated in
            # metered_execute. Need to think what to do about it.
            duration = (time.time() - start_time) * 1000
            self.query_duration += duration
dataset/ETHPy150Open getredash/redash/redash/metrics/database.py/MeteredPostgresqlExtDatabase.execute_sql/original