diff options
author | Greg Sabino Mullane | 2009-07-24 01:19:13 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2009-07-24 01:19:13 +0000 |
commit | 592984fbad81a42bf9c91d250b0211177fb864f5 (patch) | |
tree | 040864dbce172a2f0135040ff21bb4d06194eafb /check_postgres.pl | |
parent | 643e9ec47ea417c723fa7723b9d508ce641f94b6 (diff) |
More tweaks to check_bloat and --include.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 6 |
1 files changed, 4 insertions, 2 deletions
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); |