From: Greg Sabino Mullane Date: Fri, 24 Jul 2009 01:19:13 +0000 (-0400) Subject: More tweaks to check_bloat and --include. X-Git-Tag: 2.9.5~3 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=592984fbad81a42bf9c91d250b0211177fb864f5;p=check_postgres.git More tweaks to check_bloat and --include. --- diff --git a/check_postgres.pl b/check_postgres.pl index 69e477033..b85d2d7ac 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -2498,9 +2498,11 @@ FROM ( if (! defined $opt{include}) { $SQL .= " WHERE sml.relpages - otta > $MINPAGES OR ipages - iotta > $MINIPAGES"; - $SQL .= " LIMIT $LIMIT"; + $SQL .= " ORDER BY wastedbytes DESC LIMIT $LIMIT"; + } + else { + $SQL .= " ORDER BY wastedbytes DESC"; } - $SQL .= " ORDER BY wastedbytes DESC"; my $info = run_command($SQL);