← プロジェクト一覧に戻る

ClickHouse

エージェントのトレース基盤が土台に選ぶ列指向SQLデータベース

公式Apache-2.0
スター
49.3k
フォーク
8.8k
オープンIssue
6.9k
最終コミット
2026年8月16日

概要

追記が中心で値の種類が多いデータ——モデル呼び出しごとに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グラフを構築し、距離関数はL2DistancecosineDistancedotProductから選べます。バージョン25.8以降で利用でき、検索時にはインデックス全体をディスクからメモリへ読み込む必要があるほか、構築コストが挿入とマージを遅くします。
  • 絞り込むと全件走査に落ちるメタデータによる事前絞り込みは公式ドキュメント自身が未解決の問題だと述べており、ClickHouseは厳密な近傍探索へフォールバックします。事後絞り込みの場合は、候補がWHERE条件を満たさなかった分だけLIMITで要求した件数に届かないことがあります。大規模なコレクションを狭い条件で絞り込む用途が中心なら、専用のベクトルストアのほうが適しています。
  • MCP経由でエージェントに問い合わせさせるClickHouseは別リポジトリでmcp-clickhouseを公開しており、list_databaseslist_tablesrun_queryに加え、組み込みエンジンchDB向けのツールを提供します。既定では読み取り専用で、書き込みはCLICKHOUSE_ALLOW_WRITE_ACCESS=trueDROPTRUNCATEはさらに別のフラグを立てない限り実行できません。

ドキュメント

ClickHouse/ClickHouse のREADMEより転載(Apache-2.0)。 原文を読む ↗

How To Install (Linux, macOS, FreeBSD)

curl https://clickhouse.com/ | sh
  • 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

Recent meetups

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!