Skip to content

Use ClickHouse for app open stats#2662

Merged
jelveh merged 1 commit intomainfrom
clickhouse-refresh-stats
Mar 13, 2026
Merged

Use ClickHouse for app open stats#2662
jelveh merged 1 commit intomainfrom
clickhouse-refresh-stats

Conversation

@jelveh
Copy link
Copy Markdown
Contributor

@jelveh jelveh commented Mar 13, 2026

When a global ClickHouse client is available, run two parallel ClickHouse queries (JSONEachRow) to fetch per-app open_count and distinct user_count, parse results into Maps (parsing counts as integers). If ClickHouse is not present, fall back to the original MySQL aggregate queries. Apps list still comes from MySQL as before. This enables using ClickHouse for analytics performance while preserving the existing behavior as a fallback.

When a global ClickHouse client is available, run two parallel ClickHouse queries (JSONEachRow) to fetch per-app open_count and distinct user_count, parse results into Maps (parsing counts as integers). If ClickHouse is not present, fall back to the original MySQL aggregate queries. Apps list still comes from MySQL as before. This enables using ClickHouse for analytics performance while preserving the existing behavior as a fallback.
@jelveh jelveh merged commit e28a5b0 into main Mar 13, 2026
1 check passed
@jelveh jelveh deleted the clickhouse-refresh-stats branch May 1, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant