Skip to content

Commit

Permalink
Update hypertable_compression_settings.md (#3837)
Browse files Browse the repository at this point in the history
Use view output as of v2.18.1

Signed-off-by: Jeff Lambert <jflambert@users.noreply.github.com>
Co-authored-by: Iain Cox <iain@timescale.com>
  • Loading branch information
jflambert and billy-the-fish authored Feb 19, 2025
1 parent 660aa66 commit ff8787e
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions api/hypertable_compression_settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,35 @@ api:

# timescaledb_information.hypertable_compression_settings

Shows information about compression settings for each hypertable that has compression enabled on it.
Shows information about compression settings for each hypertable chunk that has compression enabled on it.

### Arguments

|Name|Type|Description|
|-|-|-|
|`hypertable`|`REGCLASS`|Hypertable which has compression enabled|
|`chunk`|`REGCLASS`|Hypertable chunk which has compression enabled|
|`segmentby`|`TEXT`|List of columns used for segmenting the compressed data|
|`orderby`|`TEXT`| List of columns used for ordering compressed data along with ordering and NULL ordering information|
|`compress_interval_length`|`TEXT`|Interval used for [rolling up chunks during compression][rollup-compression]|

### Sample use

Show compression settings for all hypertables:

```sql
SELECT * FROM timescaledb_information.hypertable_compression_settings'
SELECT * FROM timescaledb_information.hypertable_compression_settings;
hypertable | measurements
chunk | _timescaledb_internal._hyper_2_97_chunk
segmentby |
orderby | "time" DESC
compress_interval_length |
orderby | time DESC
```

Find compression settings for a specific hypertable:

```sql
SELECT * FROM timescaledb_information.hypertable_compression_settings WHERE hypertable::TEXT LIKE 'metrics';
hypertable | metrics
segmentby | metric_id
orderby | "time"
compress_interval_length |
chunk | _timescaledb_internal._hyper_1_12_chunk
segmentby | metric_id
orderby | time DESC
```
[rollup-compression]: /use-timescale/:currentVersion:/compression/manual-compression/#roll-up-uncompressed-chunks-when-compressing

0 comments on commit ff8787e

Please sign in to comment.