From 674fefa997d4ef8dfe1b064034fdf3d5b6961d45 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Thu, 6 Oct 2011 12:39:26 -0400 Subject: [PATCH] Show bloat when indexes are high too --- check_postgres.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'; -- 2.30.2