This article is half-done without your Comment! *** Please share your thoughts via Comment ***
In this post, I am sharing a script to find a list of Append Only or Append Optimized tables of Greenplum.
Before Greenplum 4.3, when you create Append only table, you can only perform insert and select on that table.
But from Greenplum 4.3, now you can perform UPDATE as well but still Append Only is efficient storage.
The Append Only tables are faster and also it reduces the disk usage by compressing the data size. You can use below script to find a list of Append only tables.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
SELECT b.nspname||'.'||a.relname as TableName ,case c.columnstore when 'f' then 'Row Orientation' when 't' then 'Column Orientation' end as TableStorageType ,case COALESCE(c.compresstype,'') when '' then 'No Compression' else c.compresstype end as CompressionType FROM pg_class a ,pg_namespace b ,(select relid,segrelid,segidxid,columnstore,compresstype from pg_appendonly) c WHERE b.oid=a.relnamespace and a.oid=c.relid |