> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# SHOW PROFILELIST

> SHOW PROFILELIST lists the query profile records cached in your cluster.

## 功能

列出 集群中缓存的 Query Profile 记录。更多信息，参考 [Query Profile 概述](/documents/cn/4.2/best_practices/query_tuning/query_profile_overview.md)。

此功能自 v3.1 起支持。

默认情况下，该操作无需任何权限。如果将 FE 配置项 `authorization_enable_query_profile_access_check` 设置为 `true`，用户只能查看自己执行的查询的 Query Profile 记录；查看其他用户执行的查询的 Query Profile 记录，需要 SYSTEM 级 OPERATE 权限。有关授权操作，参见 [GRANT](/documents/cn/4.2/sql-reference/sql-statements/account-management/GRANT.md)。

## 语法

```SQL theme={null}
SHOW PROFILELIST [LIMIT n]
```

## 参数说明

`LIMIT n`：列出最新 n 条记录。

## 返回

| **返回** | **说明** |
| - | - |
| QueryId | 查询 ID。 |
| CustomQueryId | 该查询绑定的自定义查询 ID（如果会话设置了 `custom_query_id`），否则为空。 |
| StartTime | 查询开始时间。 |
| Time | 查询时长。 |
| State | 查询状态，其中包括`Error`：查询异常。`Finished`：查询执行结束。`Running`：查询正在执行。 |
| Statement | 查询对应 SQL。 |

## 示例

示例一：列出最新 5 条 Query Profile 记录。

```SQL theme={null}
SHOW PROFILELIST LIMIT 5;
```

## 相关 SQL

* [ANALYZE PROFILE](/documents/cn/4.2/sql-reference/sql-statements/cluster-management/plan_profile/ANALYZE_PROFILE.md)
* [EXPLAIN ANALYZE](/documents/cn/4.2/sql-reference/sql-statements/cluster-management/plan_profile/EXPLAIN_ANALYZE.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.