Samples
To retrieve compression statistics:-
Show the compression status of the
conditions:Returns: -
Use
pg_size_prettyget the output in a more human friendly format:Returns:
Arguments
| Name | Type | Description |
|---|---|---|
hypertable | REGCLASS | to show statistics for |
Returns
| Column | Type | Description |
|---|---|---|
total_chunks | BIGINT | The number of s used by the . Returns NULL if compression_status == Uncompressed. |
number_compressed_chunks | INTEGER | The number of s used by the that are currently compressed. Returns NULL if compression_status == Uncompressed. |
before_compression_table_bytes | BIGINT | Size of the heap before compression. Returns NULL if compression_status == Uncompressed. |
before_compression_index_bytes | BIGINT | Size of all the indexes before compression. Returns NULL if compression_status == Uncompressed. |
before_compression_toast_bytes | BIGINT | Size the TOAST table before compression. Returns NULL if compression_status == Uncompressed. |
before_compression_total_bytes | BIGINT | Size of the entire table (before_compression_table_bytes + before_compression_index_bytes + before_compression_toast_bytes) before compression. Returns NULL if compression_status == Uncompressed. |
after_compression_table_bytes | BIGINT | Size of the heap after compression. Returns NULL if compression_status == Uncompressed. |
after_compression_index_bytes | BIGINT | Size of all the indexes after compression. Returns NULL if compression_status == Uncompressed. |
after_compression_toast_bytes | BIGINT | Size the TOAST table after compression. Returns NULL if compression_status == Uncompressed. |
after_compression_total_bytes | BIGINT | Size of the entire table (after_compression_table_bytes + after_compression_index_bytes + after_compression_toast_bytes) after compression. Returns NULL if compression_status == Uncompressed. |
node_name | TEXT | nodes on which the is located, applicable only to distributed s. Returns NULL if compression_status == Uncompressed. |