Hacker News Signals Interest in SQL-Driven LLM Debugging Over Massive CI Log Warehouses

What surfaced on Hacker News

A Hacker News post linking Mendral’s article “LLMs Are Good at SQL. We Gave Ours Terabytes of CI Logs.” reached strong engagement at crawl time, with 191 points and 97 comments. The core claim is operational, not speculative: an internal agent traced a flaky test to a dependency bump from three weeks earlier by writing SQL and iterating across very large CI datasets in seconds.

Why the architecture matters

The article describes a deliberate design choice: expose a scoped SQL interface to the agent instead of a narrow prebuilt tool API. The team argues this gives the model freedom to ask unanticipated questions during root-cause analysis. Their reported volume is substantial: around 1.5 billion CI log lines and 700,000 jobs per week. Data lands in ClickHouse with a stated 35:1 compression ratio, enabling broad historical context without keeping logs in fragmented systems.

They also share usage telemetry from 8,534 agent sessions and 52,312 queries. According to the post, agents use job-metadata views for broad triage, then drill into raw log lines for targeted evidence. Median latency is reported as 20ms for metadata queries and 110ms for raw-log queries, with heavier billion-row investigations taking longer but still completing.

Storage, indexing, and practical tradeoffs

One notable detail is heavy denormalization: each log line carries 48 metadata fields. In row stores this would be expensive, but the article argues columnar compression and repeated values make it efficient at this scale. Reported storage figures were 5.31 TiB uncompressed data reduced to 154 GiB on disk. The team credits key design choices such as sort keys aligned to org/time access patterns, bloom/ngram-style skipping indexes, and materialized views for frequent aggregations.

Engineering takeaway

The post’s practical message is that LLM effectiveness in operations depends less on prompt tricks and more on data-plane design: schema shape, query latency, and historical depth. For teams building AI-assisted debugging, the pattern here is clear: keep the tool interface expressive (SQL), constrain scope per tenant, and invest in observability storage that can sustain exploratory query behavior under production load.

Hacker News thread | Original article