How to Check the Compression and Distribution of an Append-Only Table

posted Apr 28, 2017, 4:35 PM by Sachchida Ojha
Greenplum provides built-in functions to check the compression ratio and the distribution of an append-only table. Both functions take either the object ID or name of a table. The table name may be qualified with a schema name.

Function                                  Return Type                                    Description

get_ao_distribution(name)         Set of (dbid, tuplecount)  rows          Shows the distribution of rows of an append-only table across the array. Returns a set of rows, 
get_ao_distribution(oid)                                                                  each of which includes a segment dbid and the number of tuples stored on the segment.

get_ao_compression_ratio(name)  float8                                         Calculates the compression ratio for a compressed append-only table. If information is not 
get_ao_compression_ratio(oid)                                                       available, this function returns a value of -1.


Comments