How Artemis Security runs 69x faster detection queries with ClickHouse Cloud
Artemis, an AI-native threat detection platform ingesting terabytes of logs daily, sped up its ClickHouse Cloud workload with three techniques. Query coalescing merges hundreds of detection-rule predicates into a single scan that tags matching rows with rule IDs, cutting one benchmark from 173s to 2.5s (69x) with 46x less CPU. It relies on a runtime classifier that excludes the roughly 15% of rules using JOINs, CTEs or GROUP BY, plus size-aware batching with a binary-split fallback around max_query_size. A Claude Code skill called /poke automates debugging across system tables, metrics and source code. A materialized view extracts hot JSON sub-columns into native types and feeds a two-step filter-then-fetch query pattern, making investigative queries 30-60x faster with up to 400x lower CPU.
Related posts
- How Exabeam uses ClickHouse for scalable, searchable security analytics
ClickHouse mediumAdept
Exabeam runs its security analytics platform on ClickHouse Cloud across 10 regions, ingesting up to 1.2M events/sec per region (80B+ daily, 3.5 PB raw compressed to 200 TiB), with compute-compute separation that isolates write, merge and read nodes. Key optimizations: consolidating commonly queried fields into one wide column cut query latency from 8s to under 1s, folding sparse fields into a key-value column shrank the schema from 1,150 to 250 columns and raised throughput from 100K to 250K events/sec on three nodes, and ingestor tuning (Jackson over Gson, larger Gzip buffers, better serialization) cut memory 45%. Splitting backdated events into a separate backlog pipeline reduced part-file explosion and aborted merges, and replacing N-gram indexes with token-based indexes lowered hardware cost since regex queries were under 1% of workload.
- Intelligent security at ClickHouse speed: How Cogent Security built an AI-native vulnerability management platform
ClickHouse mediumAdept
Cogent Security serves billions of vulnerability findings from per-tenant ClickHouse databases fed by a pipeline of entity resolution into a Knowledge Graph, dbt-built denormalized Iceberg tables, and the ClickHouse Spark Connector. Moving off Postgres cut P50/P90/P99 latency from 2s/5s/25s to 0.3s/0.9s/2.5s at 100M rows with no caching, driven by query-first table design, denormalization, projections, and per-column codecs. Their text-to-SQL Chart Agent rose from 40% accuracy single-shot to 94% through an agentic loop with RAG, live SQL execution, a golden query bank, tenant memory, and simpler queries over pre-computed ClickHouse projections. Evaluation compares data output rather than SQL strings, with three-run majority voting, and an in-house Ontology Service keeps schema semantics and per-tenant overlays in sync with the physical schema.
- Cisco Talos empowers threat researchers while reducing TCO by 75% with ClickHouse Cloud
ClickHouse mediumAdept
Cisco Talos moved its file-hash reputation service, nearly 2 trillion rows (192 TB compressed, ~2 PB raw) growing by 27 billion rows a day, from a self-managed ClickHouse cluster on EKS to ClickHouse Cloud with zero downtime. The new pipeline replaces custom ingestion code with EventBridge, SQS and ClickPipes. It uses SharedMergeTree on object storage with query-time aggregation instead of pre-aggregation, and serves queries over AWS PrivateLink. The migration ran in four phases: Terraform foundation, a sharded backfill, shadow traffic, then cutover with a 100% match on 1,000+ sampled hashes. Separating storage from compute cut storage costs ~90%, total cost of ownership ~75%, and saved over 300 engineer hours a year.
- Why OpenAI chose ClickHouse for petabyte-scale observability
ClickHouse mediumAdept
OpenAI ingests petabytes of logs daily, growing over 20% monthly, into a ClickHouse cluster of 90 shards with two replicas each, fed by Fluent Bit agents. Recent data stays on local disk because about 80% of queries touch the last two days, and older logs tier to blob storage. ClickHouse was chosen for being open source, horizontally scalable, tunable in its indexing and queryable in SQL. When the GPT-4o image generation launch raised log volume 50% overnight, the team added a query-only replica and sampled logs, then profiled ClickHouse and found more than half of CPU time going to Bloom filter construction. Replacing a per-insert division with a multiply and bit shift cut CPU usage 40%, and the fix was upstreamed.
- How Mercado Libre rebuilt its observability platform on ClickHouse Cloud with 75x faster trace queries
ClickHouse mediumAdept
Mercado Libre moved the storage layer of its OpenTelemetry-based tracing platform, O11y events, to ClickHouse Cloud. Transformation, filtering and aggregation now run inside the database through materialized views instead of on clients at query time. A ReplacingMergeTree lookup table ordered by attribute key, time buckets, value and trace ID, with a Bloom filter skip index, supports two-step high-cardinality queries against an AggregatingMergeTree trace summary. Queries dropped from over five minutes to about four seconds (75x), compression reached 86–89% on trillions of rows, and throughput is 400M spans/min with only 30% of critical apps migrated. Lessons include benchmarking under real load, iterating on primary keys, tuning batch and async inserts, and separating read, write and merge clusters.