Show bloat when indexes are high too
authorGreg Sabino Mullane <[email protected]>
Thu, 6 Oct 2011 16:39:26 +0000 (12:39 -0400)
committerGreg Sabino Mullane <[email protected]>
Thu, 6 Oct 2011 16:39:26 +0000 (12:39 -0400)
check_postgres.pl

index 2fad37a99b56a7e279f8a2ed76bef90d26dd752a..ccf62a072e8fb9c41175cb764061cb412f949a3c 100755 (executable)
@@ -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';