Manually convert a specific chunk in the hypertable rowstore to the columnstore.

Although convert_to_columnstore gives you more 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.

Since TimescaleDB v2.18.0

To convert a single chunk to columnstore:

CALL convert_to_columnstore('_timescaledb_internal._hyper_1_2_chunk');
NameTypeDefaultRequiredDescription
chunkREGCLASS-Name of the chunk to add to the columnstore.
if_not_columnstoreBOOLEANtrueSet to false so this job fails with an error rather than a warning if chunk is already in the columnstore.
recompressBOOLEANfalseSet to true to add a chunk that had more data inserted after being added to the columnstore.
hypercore_use_access_methodBOOLEANNULLSet to true to use hypercore table access metod. If set to NULL it will use the value from timescaledb.default_hypercore_use_access_method.

Calls to convert_to_columnstore return:

ColumnTypeDescription
chunk name or tableREGCLASS or StringThe 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.