Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

ClickHouse 9 min read Case study mediumAdept

Intelligent security at ClickHouse speed: How Cogent Security built an AI-native vulnerability management platform

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.

Assumes: columnar databasestext-to-SQL with LLMsdata lakehouse basics

Related posts

  • How Fetch built its flexible agentic analytics tool on ClickHouse Cloud

    ClickHouse easyNovice

    Fetch built FAST, a conversational BI agent that lets non-technical sales teams query receipt purchase data in plain language, on ClickHouse Cloud ingesting 150 billion rows (6.5 TB compressed) a day. Ad hoc queries such as same-receipt basket intersections scan hundreds of millions of rows in under a second, and median agent response time is 1.9 seconds across about 500 daily queries. The team picked ClickHouse for its ad hoc query speed, compute isolation between concurrent queries and simple scaling. A nightly pipeline copies data from Snowflake to S3, loads it via ClickPipes into a new versioned wide table, then repoints a view at it. That keeps LLM-generated queries stable and makes rollback trivial, at the cost of skipping incremental loads.

  • How Artemis Security runs 69x faster detection queries with ClickHouse Cloud

    ClickHouse mediumAdept

    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.

  • ClickHouse Powers Dassana’s Security Data Lake

    ClickHouse mediumAdept

    Dassana built a security data lake on ClickHouse to normalize mutable security findings (alerts whose state changes) that append-only SIEMs handle poorly. After ReplacingMergeTree and AggregatingMergeTree with materialized views struggled at scale, they solved last-point queries with a ClickHouse dictionary that periodically refreshes (every 5 seconds) the max insert timestamp per cityHash64(tenant, record_id), then filtering the main table via dictGet. The approach outperformed the Join engine and fit hundreds of millions of distinct assets in 32GB RAM, at the cost of a few seconds of staleness. Lessons include keeping test and production hardware at parity and avoiding experimental features such as projections in production.

  • Fast, Feature Rich and Mutable : ClickHouse Powers Darwinium's Security and Fraud Analytics Use Cases

    ClickHouse easyNovice

    Darwinium, a digital risk and fraud platform, chose ClickHouse to back interactive security and fraud analytics over large, wide, long-retention event data. Its reasons were simpler ingestion than immutable HDFS-style pipelines, AggregatingMergeTree tables that maintain rollups without a separate pipeline, and a single server absorbing thousands of writes per second on ~3k-column rows at under 5% CPU. Map, Array and JSON types absorb fast-changing model signals without schema churn, and tiered SSD-to-S3 retention, sharding and replication handle cost and availability. Group-by queries on a 40M-row, ~3k-column table under varying analyst concurrency are charted as evidence of sub-second interactive performance.

  • How Fountain rebuilt its data plane on ClickHouse Cloud to power Cue, the Frontline Superintelligence

    ClickHouse mediumAdept

    Fountain replaced a multi-vendor batch pipeline (third-party replication to S3/Iceberg, then BigQuery) with ClickPipes CDC streaming Postgres and MongoDB directly into ClickHouse Cloud, cutting analytics freshness from three hours to under two minutes, with most queries sub-second, at about 66% lower cost. MongoDB documents land in ClickHouse's native JSON type, which enables schema-on-read dot-notation access, and over 2,000 incremental materialized views built with dbt replace any orchestrator. Moving a lagInFrame plus ASOF JOIN window computation into insert-time materialized views cut per-query memory by 80% on an 838M-row table, and 60-98% across other query shapes. Tenant isolation for the Cue LLM agent is enforced through empty service users, versioned RBAC roles, session variables set by the MCP backend, and row policies, so the design fails closed and resists prompt injection.

The quest for software engineering knowledge.

Look:
Layout: