ClickHouse
エージェントのトレース基盤が土台に選ぶ列指向SQLデータベース
概要
追記が中心で値の種類が多いデータ——モデル呼び出しごとに1行を記録し、後からモデル名やコスト、エラーで絞り込む——に向いた列指向エンジンです。Langfuseは2024年12月にトレースの保存先をPostgreSQLからClickHouseへ移し、2026年1月にはClickHouseがLangfuseを買収したため、セルフホストの可観測性基盤を組むと下層にこれが入る構成が増えています。一方でトランザクション処理には向かず、更新や削除は行の書き換えではなく列パート単位の再作成になるため、アプリケーションの状態を書き込む先ではなく、エージェントの実行記録が着地する場所として扱ってください。
ClickHouseで何ができますか?
- モデル呼び出し1回を1行として保存 — 列指向のため、モデル名やコスト、エラー状態で絞り込むクエリは該当する列だけを読み、数MBに及ぶ入出力の本文はディスクに残ります。書き込みも1行ずつではなく大きなバッチを取り込んで背後で統合する設計で、キューに溜めてから流すトレース収集の書き込み方と噛み合います。
- Langfuseの下層をそのまま使う — Langfuseは2024年12月にトレースの保存先をPostgreSQLからClickHouseへ移し、2026年1月16日にClickHouseがLangfuseを買収しました。買収の発表では、コア機能はMITライセンスのまま本番規模のセルフホストが可能だと明言されています。ClickHouse自身のOpenTelemetry準拠の可観測性スタックであるClickStackも同じエンジン上で動きます。
- ベクトル検索用のDBを別に建てない —
vector_similarityインデックスはArray(Float32)、Array(Float64)、Array(BFloat16)の列にHNSWグラフを構築し、距離関数はL2Distance、cosineDistance、dotProductから選べます。バージョン25.8以降で利用でき、検索時にはインデックス全体をディスクからメモリへ読み込む必要があるほか、構築コストが挿入とマージを遅くします。 - 絞り込むと全件走査に落ちる — メタデータによる事前絞り込みは公式ドキュメント自身が未解決の問題だと述べており、ClickHouseは厳密な近傍探索へフォールバックします。事後絞り込みの場合は、候補が
WHERE条件を満たさなかった分だけLIMITで要求した件数に届かないことがあります。大規模なコレクションを狭い条件で絞り込む用途が中心なら、専用のベクトルストアのほうが適しています。 - MCP経由でエージェントに問い合わせさせる — ClickHouseは別リポジトリで
mcp-clickhouseを公開しており、list_databases、list_tables、run_queryに加え、組み込みエンジンchDB向けのツールを提供します。既定では読み取り専用で、書き込みはCLICKHOUSE_ALLOW_WRITE_ACCESS=true、DROPとTRUNCATEはさらに別のフラグを立てない限り実行できません。
ドキュメント
ClickHouse/ClickHouse のREADMEより転載(Apache-2.0)。 原文を読む ↗
How To Install (Linux, macOS, FreeBSD)
curl https://clickhouse.com/ | sh
Useful Links
- Official website has a quick high-level overview of ClickHouse on the main page.
- ClickHouse Cloud ClickHouse as a service, built by the creators and maintainers.
- Tutorial shows how to set up and query a small ClickHouse cluster.
- Documentation provides more in-depth information.
- YouTube channel has a lot of content about ClickHouse in video format.
- ClickHouse Theater contains presentations and videos about ClickHouse.
- Slack and Telegram allow chatting with ClickHouse users in real-time.
- Blog contains various ClickHouse-related articles, as well as announcements and reports about events.
- Bluesky and X for short news.
- Code Browser (github.dev) with syntax highlighting, powered by github.dev.
- Contacts can help to get your questions answered if there are any.
Monthly Release & Community Call
The ClickHouse 26.7 Release Call took place on July 23, 2026 — watch the recording and the slides.
The ClickHouse 26.6 special “10 Year Anniversary” Release Call — recording and slides.
Watch all release presentations and videos at ClickHouse Theater and YouTube Playlist.
Upcoming Events
Keep an eye out for upcoming meetups and events around the world. Want to speak? Apply here You can also peruse ClickHouse Events for a list of all upcoming trainings, meetups, speaking engagements, etc.
Upcoming meetups
- AI Builders Night SF - July 14th, 2026
- Data Engineering Things Seattle Meetup - July 16th, 2026
- Bangkok OSS & Data Evening: Queries, Code & Community - July 23rd, 2026
- Happy Hour warm-up: AWS Summit Bogotá - July 30th, 2026
- ClickHouse Singapore August 2026 Edition - August 4th, 2026
- ClickHouse Jakarta Meetup - August 5th, 2026
- AI Demo Night - August 6th, 2026
- Data Engineering Meetup - August 11th, 2026
- AI Demo Night - August 18th, 2026
- NYC Apache Iceberg™ Community Meetup - August 20th, 2026
- Bangalore Iceberg Community Meetup - August 22nd, 2026
- Vancouver Meetup - August 25th, 2026
- The Agentic Data Stack: Berlin - September 2nd, 2026
- Amsterdam Meetup - September 15th, 2026
- Cape Town Meetup - September 15th, 2026
- Rows And Columns Summit - September 22nd, 2026
- Paris Meetup - September 29th, 2026
Recent meetups
- Happy Hour Open Source de Montréal - July 9th, 2026
- AI Builders Night NY - July 8th, 2026
- AI Builders Offstage: Docker & ClickHouse - July 7th, 2026
- AI Demo Night SF - July 1st, 2026
- KL Meetup - June 26th, 2026
- Seattle Iceberg Meetup - June 25th, 2026
Recent Recordings
- Recent Meetup Videos: Meetup Playlist Whenever possible recordings of the ClickHouse Community Meetups are edited and presented as individual talks.
Interested in joining ClickHouse and making it your full-time job?
ClickHouse is a nice DBMS, and it’s a good place to work.
Check out our current openings here: https://clickhouse.com/company/careers
Email: careers@clickhouse.com!