manus-skills/.kortix/opencode/skills/coding/clickhouse-architecture-advisor/rules/decision-real-time-preaggregation.md
zhukang 1c7abd81d1 All 310 Manus skill-hub community skills as a Kortix marketplace registry
- 310 registry:skill items, 1528 files, 7 categories (hub tags)
- registry.json generated by @kortix/registry buildRegistry
- nested SKILL.md in sn-da-* renamed SUBSKILL.md (no phantom skills)
- provenance + licenses: SOURCES.md
2026-09-15 13:37:20 +08:00

2.0 KiB

title impact tags
Choose raw-only vs incremental materialized views vs refreshable materialized views HIGH
materialized_views
preaggregation
rollups
real-time

Choose raw-only vs incremental materialized views vs refreshable materialized views

Principle

Real-time workloads should not be forced into either “everything raw” or “precompute everything.” The correct choice depends on freshness, query repetition, and transformation complexity.

Decision framework

Condition Recommendation Category
Queries are ad hoc and freshness matters most Query raw tables derived
Repeated aggregation pattern over append-only data Incremental MV official
Complex joins or scheduled batch recomputation Refreshable MV official
Very hot dashboard or alerting path Incremental rollup table plus raw table fallback derived

Guidance

Recommendation: incremental MVs for repeated real-time aggregation

Why Incremental MVs are the documented best fit for continuously maintained rollups over insert streams.

Official sources

Recommendation: refreshable MVs for heavier joins or scheduled transforms

Why Refreshable MVs better fit complex transformations that do not need per-row trigger semantics.

Official sources

Recommendation: dual-path design for hot dashboards

Why A raw table preserves flexibility while a rollup path protects latency-sensitive workloads.

Category derived

Official context

Validation

  • Identify repeated dashboard queries
  • Compare raw scan cost against incremental aggregation maintenance
  • Confirm whether the source is append-only enough for incremental MV semantics