<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/llms-are-good-at-sql-we-gave-ours-terabytes-of-ci-logs--lvk4qon8b" -->

---
title: LLMs Are Good at SQL. We Gave Ours Terabytes of CI Logs.
description: Mendral built an AI agent that investigates CI failures by writing its own SQL queries against a ClickHouse database storing 1.5 billion log lines per week....
canonical: https://daily.dev/posts/llms-are-good-at-sql-we-gave-ours-terabytes-of-ci-logs--lvk4qon8b
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: LLMs Are Good at SQL. We Gave Ours Terabytes of CI Logs. | daily.dev
og:description: Mendral built an AI agent that investigates CI failures by writing its own SQL queries against a ClickHouse database storing 1.5 billion log lines per week....
og:url: https://daily.dev/posts/llms-are-good-at-sql-we-gave-ours-terabytes-of-ci-logs--lvk4qon8b
og:image: https://api.daily.dev/og/posts/lvk4qOn8B.png
og:image:alt: LLMs Are Good at SQL. We Gave Ours Terabytes of CI Logs.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# LLMs Are Good at SQL. We Gave Ours Terabytes of CI Logs.

**[Hacker News](https://daily.dev/sources/hn)** · 11 min read · 1 upvotes · 0 comments

## Summary

Mendral built an AI agent that investigates CI failures by writing its own SQL queries against a ClickHouse database storing 1.5 billion log lines per week. The system denormalizes 48 metadata columns onto every log row, achieving 35:1 compression (21 bytes per line on disk). The agent runs multi-step investigations averaging 4.4 queries per session, with median query latency of 20ms for job metadata and 110ms for raw log scans. Key engineering decisions include bloom filter skip indexes for full-text search, materialized views for pre-aggregated failure rates, and a throttled GitHub API ingestion pipeline using durable execution (Inngest) to stay under rate limits while keeping data fresh within 5 minutes P95.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.mendral.com/blog/llms-are-good-at-sql>

## Similar posts on daily.dev

- [How your LLM is silently hallucinating company revenue](https://daily.dev/posts/how-your-llm-is-silently-hallucinating-company-revenue-hjxe0tjwy) · The New Stack · 4 upvotes · 0 comments
- [How We Debug 1000s of Databases with AI at Databricks](https://daily.dev/posts/how-we-debug-1000s-of-databases-with-ai-at-databricks-c1qxhga8g) · databricks · 1 upvotes · 0 comments
- [How iFood built its agentic security platform on ClickHouse Cloud](https://daily.dev/posts/how-ifood-built-its-agentic-security-platform-on-clickhouse-cloud-0yktjc5xt) · ClickHouse · 0 upvotes · 0 comments
- [LLMs and SQL](https://daily.dev/posts/llms-and-sql-znhlfhfzb) · LangChain · 1 upvotes · 0 comments
- [Agents are coming for data \(just slowly\)](https://daily.dev/posts/agents-are-coming-for-data-just-slowly--cqwexi9vd) · InfoWorld · 0 upvotes · 0 comments

---

Tags: [#llm](https://daily.dev/tags/llm), [#cicd](https://daily.dev/tags/cicd), [#github-actions](https://daily.dev/tags/github-actions), [#clickhouse](https://daily.dev/tags/clickhouse)

[View this post on daily.dev](https://daily.dev/posts/llms-are-good-at-sql-we-gave-ours-terabytes-of-ci-logs--lvk4qon8b)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"LLMs Are Good at SQL. We Gave Ours Terabytes of CI Logs.","url":"https://daily.dev/posts/llms-are-good-at-sql-we-gave-ours-terabytes-of-ci-logs--lvk4qon8b","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/llms-are-good-at-sql-we-gave-ours-terabytes-of-ci-logs--lvk4qon8b"},"datePublished":"2026-02-27T19:12:49.335Z","dateModified":"2026-02-27T19:13:21.669Z","description":"Mendral built an AI agent that investigates CI failures by writing its own SQL queries against a ClickHouse database storing 1.5 billion log lines per week....","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/078a4a3226697783bafcc543c24ee309?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/078a4a3226697783bafcc543c24ee309?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/llms-are-good-at-sql-we-gave-ours-terabytes-of-ci-logs--lvk4qon8b","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"llm,cicd,github-actions,clickhouse","timeRequired":"PT11M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"LLMs Are Good at SQL. We Gave Ours Terabytes of CI Logs."}]}
```

