Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

サーバーパケット

名前 説明
0 Hello サーバーのハンドシェイク応答
1 Data client data と同じ
2 Exception クエリ処理中の例外
3 Progress クエリの進捗
4 Pong Ping への応答
5 EndOfStream すべてのパケットの転送完了
6 ProfileInfo プロファイリングデータ
7 Totals 合計値
8 Extremes 極値 (最小、最大)
9 TablesStatusResponse TableStatus リクエストへの応答
10 Log クエリのシステムログ
11 TableColumns カラムの説明
12 UUIDs 一意なパーツ ID の一覧
13 ReadTaskRequest 次のタスクが必要なリクエストを表す String (UUID)
14 ProfileEvents サーバーからのプロファイルイベントを含むパケット

DataTotalsExtremes は圧縮できます。

Hello

client hello への応答。

フィールド 説明
name String ClickHouse サーバー名
version_major UVarInt 21 サーバーのメジャーバージョン
version_minor UVarInt 12 サーバーのマイナーバージョン
revision UVarInt 54452 サーバーのリビジョン
tz String Europe/Moscow サーバーのタイムゾーン
display_name String <display_name-or-hostname> UI 用のサーバー名
version_patch UVarInt 3 サーバーのパッチバージョン

Exception

クエリ処理中のサーバーException。

フィールド 説明
code Int32 60 ErrorCodes.cpp を参照してください。
name String DB::Exception サーバーのメジャーバージョン
message String DB::Exception: Table X doesn't exist サーバーのマイナーバージョン
stack_trace String ~ C++ のスタックトレース
nested Bool true さらにエラーあり

nestedfalse になるまで、Exceptionが連続して並ぶ場合があります。

Progress

サーバーによって定期的に報告されるクエリ実行の Progress。

フィールド 説明
rows UVarInt 65535 行数
bytes UVarInt 871799 バイト数
total_rows UVarInt 0 合計行数
wrote_rows UVarInt 0 クライアントからの行数
wrote_bytes UVarInt 0 クライアントからのバイト数

Pong

client ping に対する応答で、パケット本文はありません。

ストリームの終端

これ以上 Data パケットは送信されず、サーバーからクライアントへのクエリ結果のストリーミングは完了しています。

パケット本文はありません。

プロファイル情報

フィールド
rows UVarInt
blocks UVarInt
bytes UVarInt
applied_limit Bool
rows_before_limit UVarInt
calculated_rows_before_limit Bool

Log

サーバーログを含むデータブロック

カラム
time DateTime
time_micro UInt32
host_name String
query_id String
thread_id UInt64
priority Int8
source String
text String

プロファイルイベント

プロファイルイベントを含むデータブロック

カラム
host_name String
current_time DateTime
thread_id UInt64
type Int8
name String
value UInt64 or Int64
Navigation