system.metrics

此系统表包含可以即时计算或具有当前值的指标。例如,同时处理的查询数量或当前的复制延迟。这个表始终是最新的。

列:

对于支持的指标列表,您可以查看 src/Common/CurrentMetrics.cpp ClickHouse 的源文件。

示例

  1. SELECT * FROM system.metrics LIMIT 10
  1. ┌─metric───────────────────────────────┬─value─┬─description────────────────────────────────────────────────────────────┐
  2. Query 1 Number of executing queries
  3. Merge 0 Number of executing background merges
  4. PartMutation 0 Number of mutations (ALTER DELETE/UPDATE)
  5. ReplicatedFetch 0 Number of data parts being fetched from replicas
  6. ReplicatedSend 0 Number of data parts being sent to replicas
  7. ReplicatedChecks 0 Number of data parts checking for consistency
  8. BackgroundMergesAndMutationsPoolTask 0 Number of active merges and mutations in an associated background pool
  9. BackgroundFetchesPoolTask 0 Number of active fetches in an associated background pool
  10. BackgroundCommonPoolTask 0 Number of active tasks in an associated background pool
  11. BackgroundMovePoolTask 0 Number of active tasks in BackgroundProcessingPool for moves
  12. └──────────────────────────────────────┴───────┴────────────────────────────────────────────────────────────────────────┘

另请参阅