This should be one of the first videos to be presented to clickhouse noobs as it contains the very basic concept of parts and merges that are not very well introduced in the written documentation. Either update the docs or change the title of the video to intro to clickhouse.
Extremely helpful video, particularly explaining the concepts on agg mergetrees in theory never merging to a single file. It was very counterintuitive for me at first.
Projection is great. if you have very defined use-case, it abstracts away all the complexity of materialized view. Will we be able to create separate indexes on projection queries too?
If you just create the projection (ALTER TABLE ... ADD PROJECTION ...) then only new inserts are processed also by the projection. But if you create + materialize (ALTER TABLE ... ADD PROJECTION ... + ALTER TABLE ... MATERIALIZE PROJECTION ...), then also all existing data is transformed. You can see an example in this tutorial: clickhouse.com/docs/en/getting-started/example-datasets/uk-price-paid#speedup-with-projections
This should be one of the first videos to be presented to clickhouse noobs as it contains the very basic concept of parts and merges that are not very well introduced in the written documentation. Either update the docs or change the title of the video to intro to clickhouse.
Extremely helpful video, particularly explaining the concepts on agg mergetrees in theory never merging to a single file. It was very counterintuitive for me at first.
Fantastic explanation, made it very simple. Thanks!
Very clear explanation. Thanks!
Projection is great. if you have very defined use-case, it abstracts away all the complexity of materialized view. Will we be able to create separate indexes on projection queries too?
If i create a projection on a table that has data, will the project process both existing and new data to that table or just only new inserts?
Sorry for delay. I will ask and let you know.
You can also, always, join our Slack to chat in realtime.
If you just create the projection (ALTER TABLE ... ADD PROJECTION ...) then only new inserts are processed also by the projection.
But if you create + materialize (ALTER TABLE ... ADD PROJECTION ... + ALTER TABLE ... MATERIALIZE PROJECTION ...), then also all existing data is transformed.
You can see an example in this tutorial: clickhouse.com/docs/en/getting-started/example-datasets/uk-price-paid#speedup-with-projections
very nice video :3 love this a lot
Great explanations, except that the avg price example in the materialized view is actually showing the sum of the prices. 😮
It stores the sum and the number of values contributing to the sum. That's the aggregation state. You can get the avg from sum/count.