-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Description
(you don't have to strictly follow this form)
Use case
We use materialized columns extensively in our analytics app to speed up queries on a lot of free-form json data where the structure is not static.
Managing these columns is however a pain because:
- Adding them, the data starts trickling in only forwards
- To populate the data for historic data, you need to OPTIMIZE the whole data or partition. https://clickhouse.tech/docs/en/sql-reference/statements/optimize/
Describe the solution you'd like
Extend optimize
statement to allow materializing only one column.
OPTIMIZE TABLE [db.]name [ON CLUSTER cluster] [COLUMN mat_column] [PARTITION partition | PARTITION ID 'partition_id']
Ex: OPTIMIZE TABLE mytable ON CLUSTER cluster COLUMN mycolumn
Describe alternatives you've considered
Optimizing our whole dataset every time we materialize a column. This runs into issues due to heavy I/O
Additional context
Add any other context or screenshots about the feature request here.