From 66147a3ed39d87f77ec48a643582b86914a67bf6 Mon Sep 17 00:00:00 2001 From: Darold Gilles Date: Fri, 19 Sep 2014 10:20:05 +0200 Subject: [PATCH] Remove debug query from explain-slowest tool. --- tools/pgbadger_tools | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tools/pgbadger_tools b/tools/pgbadger_tools index 96114b7..76d8297 100755 --- a/tools/pgbadger_tools +++ b/tools/pgbadger_tools @@ -746,23 +746,6 @@ sub dump_slowest_queries } $explain .= "$top_slowest[$i]->[2]\n"; $explain .= "ROLLBACK;\n" if ($analyze); -$explain = qq{ -BEGIN; -EXPLAIN (ANALYZE, VERBOSE, BUFFERS) -SELECT n.nspname as "Schema", - c.relname as "Name", - CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'm' THEN 'materialized view' WHEN 'i' THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' WHEN 'f' THEN 'foreign table' END as "Type", - pg_catalog.pg_get_userbyid(c.relowner) as "Owner" -FROM pg_catalog.pg_class c - LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace -WHERE c.relkind IN ('r','v','m','S','f','') - AND n.nspname <> 'pg_catalog' - AND n.nspname <> 'information_schema' - AND n.nspname !~ '^pg_toast' - AND pg_catalog.pg_table_is_visible(c.oid) -ORDER BY 1,2; -ROLLBACK; -}; print $explain; if ($psql_cmd) { my @tmpfile = tempfile('tmp_pgbadgeri_tools_XXXX', SUFFIX => '.txt', DIR => $TMP_DIR, UNLINK => 1 ); @@ -773,6 +756,5 @@ ROLLBACK; print `$psql_cmd -f $tmpfile[1]`; unlink($tmpfile[1]); } - last; } } -- 2.40.0