此系统表用于实现 SHOW PROCESSLIST
查询。
字段名称 | 数据类型 | 字段含义说明 |
---|---|---|
is_initial_query | UInt8 | 查询发起类型。支持如下值:
|
user | String | 发起查询的用户。请注意,在分布式处理的情况下,查询会 |
query_id | String | 查询语句 ID。 |
address | IPv6 | 请求发起的 IP 地址。在分布式处理的情况下也是如此。要追踪某个分布式查询最初从哪里发起,请查看查询请求服务器上的 |
port | UInt16 | 发起查询的客户端端口。 |
initial_user | String | 运行初始查询的用户的名称(用于分布式查询执行)。 |
initial_query_id | String | 初始查询的 ID(用于分布式查询执行)。 |
initial_address | IPv6 | 启动父查询的 IP 地址。 |
initial_port | UInt16 | 启动父查询的客户端端口。 |
interface | UInt8 | 发起查询的接口类型。支持如下值:
|
os_user | String | 运行 client 的操作系统用户名。 |
client_hostname | String | 运行 ByteHouse 客户端或其他TCP 客户端的客户端计算机的主机名。 |
client_name | String | ByteHouse客户端或其他 TCP 客户端名称。 |
client_revision | UInt32 | ByteHouse 客户端或其他 TCP 客户端的版本。 |
client_version_major | UInt32 | ByteHouse 客户端或其他 TCP 客户端的主版本。 |
client_version_minor | UInt32 | ByteHouse 客户端或其他 TCP 客户端的次要版本。 |
client_version_patch | UInt32 | ByteHouse 客户端或其他 TCP 客户端版本的补丁组件版本 |
http_method | UInt8 | 启动查询的 HTTP 方法。如下值:
|
http_user_agent | String | 以 HTTP 请求头 UserAgent 信息。 |
http_referer | String | 以 HTTP 请求头 Referer 信息(包含进行查询的页面的绝对或部分地址)。 |
forwarded_for | String | 以 HTTP 请求头 X-Forwarded-For 的信息。 |
quota_key | String | 配额设置中指定的配额键。 |
elapsed | Float64 | 自请求执行开始以来的时间(以秒为单位)。 |
is_cancelled | UInt8 | 查询是否被取消。支持如下值:
|
read_rows | UInt64 | 从表中读取的行数。在请求服务器上,对于分布式处理,这是所有远程服务器的总和。 |
read_bytes | UInt64 | 从表中读取的未压缩字节数。在请求服务器上,对于分布式处理,这是所有远程服务器的总和。 |
total_rows_approx | UInt64 | 应该读取的总行数的近似值。在请求服务器上,对于分布式处理,这是所有远程服务器的总和。在请求处理期间,当新的处理源变得可知时,它可以被更新。 |
written_rows | UInt64 | 对于 INSERT 查询,该列显示写入的行数;其他类型查询下该列数值为 0。 |
written_bytes | UInt64 | 对于 INSERT 查询,该列显示写入的字节数(未压缩);其他类型查询下该列数值为 0。 |
memory_usage | Int64 | 请求使用的 RAM 数量。它可能不包括某些类型的专用内存。请参见 max_memory_usage 设置。 |
peak_memory_usage | Int64 | 内存使用量峰值。 |
query | String | 查询文本。对于 |
thread_ids | Array(UInt64) | 参与查询执行的线程 ID。 |
ProfileEvents | Map(String, UInt64) | 关于查询测量指标。具体描述可以在表 system.events 中找到。 |
Settings | Map(String, String) | 运行查询时使用到设置参数。 |
current_database | String | 当前连接的数据库名称。 |
resource_group | String | 在查询执行期间使用资源组名称。 |
SELECT * FROM system.processes LIMIT 10 FORMAT Vertical;
Row 1: ────── is_initial_query: 1 user: default query_id: 35a360fa-3743-441d-8e1f-228c938268da address: ::ffff:172.23.0.1 port: 47588 initial_user: default initial_query_id: 35a360fa-3743-441d-8e1f-228c938268da initial_address: ::ffff:172.23.0.1 initial_port: 47588 interface: 1 os_user: bharatnc client_hostname: tower client_name: ClickHouse client_revision: 54437 client_version_major: 20 client_version_minor: 7 client_version_patch: 2 http_method: 0 http_user_agengt: http_referer: forwarded_for: quota_key: elapsed: 0.000582537 is_cancelled: 0 read_rows: 0 read_bytes: 0 total_rows_approx: 0 written_rows: 0 written_bytes: 0 memory_usage: 0 peak_memory_usage: 0 query: SELECT * from system.processes LIMIT 10 FORMAT Vertical; thread_ids: [67] ProfileEvents: {'Query':1,'SelectQuery':1,'ReadCompressedBytes':36,'CompressedReadBufferBlocks':1,'CompressedReadBufferBytes':10,'IOBufferAllocs':1,'IOBufferAllocBytes':89,'ContextLock':15,'RWLockAcquiredReadLocks':1} Settings: {'background_pool_size':'32','load_balancing':'random','allow_suspicious_low_cardinality_types':'1','distributed_aggregation_memory_efficient':'1','skip_unavailable_shards':'1','log_queries':'1','max_bytes_before_external_group_by':'20000000000','max_bytes_before_external_sort':'20000000000','allow_introspection_functions':'1'} 1 rows in set. Elapsed: 0.002 sec.