]> granicus.if.org Git - pgbadger/commitdiff
Remove debug query from explain-slowest tool.
authorDarold Gilles <gilles@darold.net>
Fri, 19 Sep 2014 08:20:05 +0000 (10:20 +0200)
committerDarold Gilles <gilles@darold.net>
Fri, 19 Sep 2014 08:20:05 +0000 (10:20 +0200)
tools/pgbadger_tools

index 96114b7bad7b69fa637119ddccca9902231fbc36..76d82973d85e2cd3a941a1c712159d6d88fd9454 100755 (executable)
@@ -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;
        }
 }