swecrets

Designing Real Schemas

Application

Apply MergeTree fundamentals to real schema-design decisions for events, metrics, and log workloads.

What this module covers

  • Events table schema pattern
  • Metrics and time-series table schema pattern
  • Kafka table engine
  • Materialized views (insert-triggered, not query-time)
  • Denormalization vs. JOINs
  • Nested and Array columns for semi-structured data
  • ARRAY JOIN
  • Window functions for sessionization and time-series
  • TTL for data retention
  • Compression codecs (choosing by column type)
  • External dictionaries for enrichment lookups
  • Projections (first mention)

Lessons

  1. 1. Events Tables at Scale20 min
  2. 2. Metrics Tables and Time-Series Patterns18 min
  3. 3. Log Ingestion: the Kafka Engine and Materialized Views18 min
  4. 4. Denormalization and Its Trade-offs19 min