feat: new clickhouse operation table rollups - #8479
Open
n1ru4l wants to merge 3 commits into
Open
Conversation
Collaborator
n1ru4l
force-pushed
the
feat-new-operation-rollups
branch
from
September 14, 2026 08:49
5ab5e42 to
3f3321e
Compare
n1ru4l
added this pull request to stack #8481
September 14, 2026 08:53
Contributor
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tags: |
n1ru4l
marked this pull request as ready for review
September 14, 2026 15:06
…ews with less dimensions for unfiltered queries for less row reads and faster speed
…oup by; order by clauses
n1ru4l
force-pushed
the
feat-new-operation-rollups
branch
from
September 14, 2026 16:11
4f5b999 to
2653b4e
Compare
n1ru4l
force-pushed
the
feat-new-operation-rollups
branch
from
September 14, 2026 16:59
9504918 to
8b02cdb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Introduces 9 new aggregation tables (3 for each original aggregation: minutely, daily, hourly).
Based on the business logic filters we can route q query to a dedicated source table and massively reduce the amount of data that must be read in order to satisfy the query.
This will also allow us to filter by
graph_idandgraph_version_idin the future.For the daily granularity tables we now use
UInt64instead ofUInt32fortotalandtotal_okvalues to give us more headroom as we are getting closer to hitting that.New Table Overview
flowchart LR source[(default.operations)] subgraph minute[Minutely - bucket with toStartOfMinute - TTL 24 hours] minDetailMV[operations_v01_minutely_mv] minDetail[(operations_v01_minutely)] minTimestampMV[operations_v01_minutely_by_timestamp_mv] minTimestamp[(operations_v01_minutely_by_timestamp)] minClientMV[operations_v01_minutely_by_client_mv] minClient[(operations_v01_minutely_by_client)] minDetailMV --> minDetail minTimestampMV --> minTimestamp minClientMV --> minClient end subgraph hour[Hourly - bucket with toStartOfHour - TTL 30 days] hourDetailMV[operations_v01_hourly_mv] hourDetail[(operations_v01_hourly)] hourTimestampMV[operations_v01_hourly_by_timestamp_mv] hourTimestamp[(operations_v01_hourly_by_timestamp)] hourClientMV[operations_v01_hourly_by_client_mv] hourClient[(operations_v01_hourly_by_client)] hourDetailMV --> hourDetail hourTimestampMV --> hourTimestamp hourClientMV --> hourClient end subgraph day[Daily - bucket with toStartOfDay - TTL 1 year] dayDetailMV[operations_v01_daily_mv] dayDetail[(operations_v01_daily)] dayTimestampMV[operations_v01_daily_by_timestamp_mv] dayTimestamp[(operations_v01_daily_by_timestamp)] dayClientMV[operations_v01_daily_by_client_mv] dayClient[(operations_v01_daily_by_client)] dayDetailMV --> dayDetail dayTimestampMV --> dayTimestamp dayClientMV --> dayClient end source --> minDetailMV source --> minTimestampMV source --> minClientMV source --> hourDetailMV source --> hourTimestampMV source --> hourClientMV source --> dayDetailMV source --> dayTimestampMV source --> dayClientMV