summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
authorGreg Sabino Mullane2011-10-06 16:39:26 +0000
committerGreg Sabino Mullane2011-10-06 16:39:26 +0000
commit674fefa997d4ef8dfe1b064034fdf3d5b6961d45 (patch)
treeed55442568dba015b9c2b6c462473c7be2094607 /check_postgres.pl
parentbd1cbaf5fb34590520ff1d067aba1b2ec768eb8e (diff)
Show bloat when indexes are high too
Diffstat (limited to 'check_postgres.pl')
-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';