summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcheck_postgres.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index 2fad37a99..ccf62a072 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -3467,7 +3467,7 @@ FROM (
if (! defined $opt{include} and ! defined $opt{exclude}) {
$SQL .= " WHERE sml.relpages - otta > $MINPAGES OR ipages - iotta > $MINIPAGES";
- $SQL .= " ORDER BY wastedbytes DESC LIMIT $LIMIT";
+ $SQL .= " ORDER BY (wastedbytes + wastedibytes) DESC LIMIT $LIMIT";
}
else {
$SQL .= ' ORDER BY wastedbytes DESC';