convert_to_columnstore()
CommunityCommunity functions are available under Timescale Community Edition. Click to learn more.Tiger Cloud: Performance, Scale, Enterprise, Free
Self-hosted products
MST
Manually convert a specific chunk in the hypertable rowstore to the columnstore.
Although convert_to_columnstore gives you more fine-grained control, best practice is to use
add_columnstore_policy. You can also add chunks to the columnstore at a specific time
running the job associated with your columnstore policy manually. 
To move a chunk from the columnstore back to the rowstore, use convert_to_rowstore.
To convert a single chunk to columnstore:
CALL convert_to_columnstore('_timescaledb_internal._hyper_1_2_chunk');
| Name | Type | Default | Required | Description | 
|---|---|---|---|---|
| chunk | REGCLASS | - | ✔ | Name of the chunk to add to the columnstore. | 
| if_not_columnstore | BOOLEAN | true | ✖ | Set to falseso this job fails with an error rather than a warning ifchunkis already in the columnstore. | 
| recompress | BOOLEAN | false | ✖ | Set to trueto add a chunk that had more data inserted after being added to the columnstore. | 
Calls to convert_to_columnstore return:
| Column | Type | Description | 
|---|---|---|
| chunk nameortable | REGCLASS or String | The name of the chunk added to the columnstore, or a table-like result set with zero or more rows. | 
Keywords
Found an issue on this page?Report an issue or Edit this page
 in GitHub.