ADX vs. ClickHouse for Database Telemetry: Cost, Schemas, and Tradeoffs

We wrote first-class Rust storage adapters for both Azure Data Explorer and ClickHouse against the exact same telemetry contract. Notes on 64-bit counter quirks, schema design, operational overhead, and real monthly bills from 5 to 500 databases.

Most comparisons of Azure Data Explorer (ADX / Kusto) and ClickHouse are written by vendors selling one of the two.

When we built the warehouse layer for Culprit SQL (covered in Microsoft Database Hub vs. Culprit + ADX), we refused to pick one cloud. We wrote two first-class Rust adapters - culprit-store-adx and culprit-store-clickhouse - against the exact same 18-table *V1 telemetry and Gold diagnosis contract (CulpritIncidentsV1, CulpritFindingsV1, CulpritChangesV1).

Building both adapters side by side exposed every practical quirk in how Kusto and ClickHouse handle 64-bit counters, nullable fields, deduplication, and monthly cloud bills.

Why database telemetry is nastier than HTTP access logs

Database observability has three requirements that trip up naive time-series schemas:

  1. Exact unsigned 64-bit counters and nanosecond clocks. SQL Server LSNs, PostgreSQL XIDs, and cumulative wait counters exceed 53-bit JavaScript floats (9,007,199,254,740,993 must round-trip without rounding), and short capture windows need nanosecond timestamp ordering.
  2. Strict distinction between NULL (unmeasured) and 0 (measured zero). If VIEW DATABASE PERFORMANCE STATE is missing, storing 0 deadlocks or 0 memory-grant waits lies to every downstream check.
  3. Large immutable artifacts. Execution plans (.sqlplan, EXPLAIN JSON) and .xel deadlock captures belong in object storage (Azure Blob or S3) keyed by SHA-256 digest, not stuffed inline into analytical columns that ruin columnstore compression.

Both ADX and ClickHouse handle high-rate append workloads effortlessly, provided you respect how their storage engines differ.

Physical schema and query tradeoffs we hit in Rust

Engineering DimensionAzure Data Explorer (culprit-store-adx)ClickHouse (culprit-store-clickhouse)
Query languageKQL (stored functions with typed tabular parameters; great ergonomics for time-window joins and arg_max)SQL (MergeTree ordered keys, CTEs, and argMax aggregates; familiar to every backend engineer)
Nulls & exact 64-bit intsNative nullable scalars + dynamic JSON bags; 64-bit signed long requires explicit decimal-string encoding for unsigned u64 above i64::MAXNative UInt64, Int64, DateTime64(9, 'UTC'), and Nullable(T) or LowCardinality(String) without auxiliary presence columns
Hot cache vs object storageBuilt-in SSD hot cache + automatic Azure Storage tiering managed by the Kusto serviceS3-backed MergeTree disks on ClickHouse Cloud, or local NVMe + tiered S3 on self-hosted StatefulSets
Auth & network modelFirst-class Entra Workload Identity (az / federated OIDC tokens) + Azure Private LinkMutual TLS, SCRAM-SHA-256 credentials, or AWS IAM roles alongside S3 IRSA
Operational overheadNear zero (managed cluster + auto-stop on Dev/Test tiers)Near zero on ClickHouse Cloud; moderate if self-hosting Keeper / replication on Kubernetes

Monthly cost across 10, 50, and 300 databases

Assuming standard 5-minute baseline schedules (Activity, WaitCounters, Operational, Settings, DeadlockHistory), episode-triggered .sqlplan recovery in Blob/S3, and 90 days of retention:

~$35-$60/mo Self-hosted ClickHouse single node (4 vCPU / 16 GB + S3) for 10-50 DBs
~$150/mo ADX Dev/Test single node + Azure Blob (no SLA, ideal for non-critical or small fleets)
~$590/mo 2-node Production ADX (1-yr Reserved) or ClickHouse Cloud Prod for 50-300 DBs

Where ClickHouse wins on price

  • 5 to 50 databases on AWS or Kubernetes: A single m7g.xlarge / Hetzner / AKS node running ClickHouse with S3 object tiering costs $35 to $80/month total, and ClickHouse Cloud’s serverless/scale-to-zero dev tiers avoid paying idle hourly minimums.
  • AWS RDS / Aurora fleets: Keeping ClickHouse and S3 in the same AWS region avoids cross-cloud egress fees that you would pay shipping RDS plans into Azure.

Where ADX wins on simplicity

  • Azure-heavy shops (50 to 500+ databases): One Entra Workload Identity covers Azure SQL, PostgreSQL Flexible Server, Azure Blob, and ADX ingestion (walkthrough here). Kusto’s caching policy (alter table ... policy caching hot = 14d) keeps 90-day queries fast without tuning disk policies.
  • Shared Kusto estate: If your platform team already ships AKS container logs and Envoy traces into ADX, adding CulpritIncidentsV1 lets responders correlate an API spike with a SQL head blocker in one KQL tab.

Switching backends is one flag

Because culprit-archive-web, culprit-notify, and the warehouse MCP server talk to the segregated WarehouseFleetReader and WarehouseIncidentReader traits in culprit-evidence, switching between ADX and ClickHouse changes zero UI views, zero alert rules, and zero MCP prompts:

# Generate schema for ClickHouse instead of ADX:
culprit collect schema --store clickhouse --database culprit > clickhouse-schema.sql

# Render sharded collector configs targeting ClickHouse + S3:
culprit collect sync-inventory \
  --cloud aws --region us-east-1 \
  --shards 2 \
  --target-kind clickhouse \
  --clickhouse-endpoint https://ch-internal.corp.example:8443 \
  --s3-bucket culprit-evidence-prod \
  --output-dir ./deploy/aws-fleet

Pick the store that sits closest to your databases and your existing identity provider; the diagnostic engine stays identical.