Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 752 Bytes

File metadata and controls

13 lines (9 loc) · 752 Bytes

Design

Here is a design of the ch-rollup solution.

design

What's going on here:

  • Scheduler starts the roll up process on each shard once an hour (in the future it will be more intelligent and consider the current cluster load).
  • Create temp table simply creates a copy of the origin table using the CREATE TABLE AS query.
  • Select data copies data to the temp table using the INSERT SELECT statement.
  • Move partitions copies data from the temp table to the origin table using a REPLACE PARTITIONS statement.
  • Drop temp table simply drops temp table using the DROP TABLE query.