GP - To gather bloat information of the relation in the database

Identifying relations that has bloat on the database
SELECT
 bdirelid AS "Relation OID",
 bdinspname ||'.'|| bdirelname AS "Relation Name",
 bdirelpages AS "Allocated Pages",
 bdiexppages AS "Pages Needed",
 bdidiag AS "Message"
FROM 
 gp_toolkit.gp_bloat_diag;
NOTE: 
  1. The query needs upto date statistics (analyze) for the relations
  2. Bloat Info will be provided only for Database against which this SQL was ran.

Comments

Popular posts from this blog

GP - Kerberos errors and resolutions

How to set Optimizer at database level in greenplum

GP - SQL Joins