How We Log LLM Requests at Sub-50ms Latency Using ClickHouse
We were logging 50,000 LLM requests per day to PostgreSQL. Query latency was fine. At 400,000 requests, cost aggregation queries started taking 3 seconds. At 2 million, the database was the slowest thing in the stack. We switched to ClickHouse. Here's exactly what changed and why. TL;DR: LLM request logs are append-only, high-cardinality, analytics-heavy — that's a ClickHouse workload, not Postgres Switching dropped our cost dashboard p95 from 3.2s to 12ms (with materialized views) Our async...
Original Source
Read the full article at Dev →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.