メインコンテンツまでスキップ
メインコンテンツまでスキップ

system.user_processes

Querying in ClickHouse Cloud

このシステムテーブルのデータは、ClickHouse Cloudの各ノードにローカルで保管されています。そのため、すべてのデータの完全なビューを取得するには、clusterAllReplicas 関数が必要です。詳細については こちら をご覧ください。

このシステムテーブルは、ユーザーのメモリ使用量とProfileEventsの概要を取得するために使用できます。

カラム:

  • user (String) — ユーザー名。
  • memory_usage (Int64) – ユーザーのすべてのプロセスによって使用されたRAMの合計。特定の種類の専用メモリは含まれない場合があります。詳細は、max_memory_usage 設定を参照してください。
  • peak_memory_usage (Int64) — ユーザーのメモリ使用量のピーク。ユーザーがクエリを実行していない場合、リセットされることがあります。
  • ProfileEvents (Map(String, UInt64)) – ユーザーのさまざまなメトリックを測定するProfileEventsの概要。これらの説明は、system.events テーブルで見つけることができます。
SELECT * FROM system.user_processes LIMIT 10 FORMAT Vertical;
Row 1:
──────
user:              default
memory_usage:      9832
peak_memory_usage: 9832
ProfileEvents:     {'Query':5,'SelectQuery':5,'QueriesWithSubqueries':38,'SelectQueriesWithSubqueries':38,'QueryTimeMicroseconds':842048,'SelectQueryTimeMicroseconds':842048,'ReadBufferFromFileDescriptorRead':6,'ReadBufferFromFileDescriptorReadBytes':234,'IOBufferAllocs':3,'IOBufferAllocBytes':98493,'ArenaAllocChunks':283,'ArenaAllocBytes':1482752,'FunctionExecute':670,'TableFunctionExecute':16,'DiskReadElapsedMicroseconds':19,'NetworkSendElapsedMicroseconds':684,'NetworkSendBytes':139498,'SelectedRows':6076,'SelectedBytes':685802,'ContextLock':1140,'RWLockAcquiredReadLocks':193,'RWLockReadersWaitMilliseconds':4,'RealTimeMicroseconds':1585163,'UserTimeMicroseconds':889767,'SystemTimeMicroseconds':13630,'SoftPageFaults':1947,'OSCPUWaitMicroseconds':6,'OSCPUVirtualTimeMicroseconds':903251,'OSReadChars':28631,'OSWriteChars':28888,'QueryProfilerRuns':3,'LogTrace':79,'LogDebug':24}

1 row in set. Elapsed: 0.010 sec.