equal
deleted
inserted
replaced
42 |
42 |
43 def list_long_queries(self, longer_than='1m'): |
43 def list_long_queries(self, longer_than='1m'): |
44 return self._query('''SELECT datname, procpid, usename, current_query AS query, |
44 return self._query('''SELECT datname, procpid, usename, current_query AS query, |
45 waiting, xact_start, query_start, backend_start |
45 waiting, xact_start, query_start, backend_start |
46 FROM pg_stat_activity |
46 FROM pg_stat_activity |
47 WHERE current_query <> '<IDLE>' AND query_start < now() - interval %s;''', |
47 WHERE current_query <> '<IDLE>' AND query_start < now() - interval %s |
|
48 ORDER BY query_start;''', |
48 longer_than) |
49 longer_than) |
49 |
50 |