Skip to content

feat: new clickhouse operation table rollups - #8479

Open
n1ru4l wants to merge 3 commits into
mainfrom
feat-new-operation-rollups
Open

feat: new clickhouse operation table rollups#8479
n1ru4l wants to merge 3 commits into
mainfrom
feat-new-operation-rollups

Conversation

@n1ru4l

@n1ru4l n1ru4l commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

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_id and graph_version_id in the future.

For the daily granularity tables we now use UInt64 instead of UInt32 for total and total_ok values 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
Loading

@theguild-bot

theguild-bot commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
hive 11.14.0-alpha-20260914170059-8b02cdb78613686524c8939307709579cca7e856 npm ↗︎ unpkg ↗︎

@n1ru4l
n1ru4l force-pushed the feat-new-operation-rollups branch from 5ab5e42 to 3f3321e Compare September 14, 2026 08:49
@n1ru4l
n1ru4l added this pull request to stack #8481 September 14, 2026 08:53
@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

🐋 This PR was built and pushed to the following Docker images:

Targets: build

Platforms: linux/amd64

Image Tags: 11.14.0-alpha-8b02cdb, 8b02cdb, 8b02cdb78613686524c8939307709579cca7e856

@n1ru4l n1ru4l changed the title feat: new operation rollups feat: new clickhouse operation table rollups Sep 14, 2026
@n1ru4l
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
@n1ru4l
n1ru4l force-pushed the feat-new-operation-rollups branch from 4f5b999 to 2653b4e Compare September 14, 2026 16:11
@n1ru4l
n1ru4l force-pushed the feat-new-operation-rollups branch from 9504918 to 8b02cdb Compare September 14, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants