> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8c05c8a2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> 包含有助于概览内存使用情况和用户 ProfileEvents 的信息的系统表。

# system.user_processes

<Info>
  **在 ClickHouse Cloud 中查询**

  此系统表中的数据分别保存在 ClickHouse Cloud 各节点的本地。因此，如需查看所有数据的完整情况，需要使用 `clusterAllReplicas` 函数。更多详情请参见[此处](/zh/reference/system-tables/overview#system-tables-in-clickhouse-cloud)。
</Info>

<div id="description">
  ## 描述
</div>

可使用此系统表查看用户的内存使用情况和 ProfileEvents 概览。

<div id="columns">
  ## 列
</div>

* `user` ([String](/zh/reference/data-types/index)) — 用户名。
* `memory_usage` ([Int64](/zh/reference/data-types/index)) — 该用户所有进程使用的 RAM 总量。可能不包括某些类型的专用内存。请参阅 max\_memory\_usage 设置。
* `peak_memory_usage` ([Int64](/zh/reference/data-types/index)) — 该用户的内存使用峰值。当该用户未运行任何查询时，该值可能会被重置。
* `ProfileEvents` ([Map(LowCardinality(String), UInt64)](/zh/reference/data-types/index)) — 用于衡量该用户不同指标的 ProfileEvents 汇总。其说明可在 system.events 表中找到。

<div id="example">
  ## 示例
</div>

```sql theme={null}
SELECT * FROM system.user_processes LIMIT 10 FORMAT Vertical;
```

```response theme={null}
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.
```
