hologres-slow-query-analysis

Installation
SKILL.md

⚠️ 执行前就绪检查(所有分析步骤之前完成)

  1. pip install hologres-cli,且 hologres status 能连通目标实例(连接哪个实例 / 库由当前 profile 决定,可用 --profile <name> 切换)。
  2. export HOLOGRES_SKILL=hologres-slow-query-analysis,便于事后审计。

RAM 权限、慢日志读授权(pg_read_all_stats / spm_grant)、版本矩阵、引擎类型语义见 references/preconditions.md

Hologres 慢 SQL 分析

基于 hologres.hg_query_log 视图分析 Hologres 实例的慢 SQL,输出结构化诊断结论 + 优化建议,回答:哪些 SQL 最值得优先优化、为什么慢、应当怎么优化。所有 SQL 通过 hologres sql run --no-limit-check 执行。

输入参数

参数 必填 说明
start_time 分析开始时间,ISO-8601(北京时间须带 +08:00
end_time 分析结束时间,格式同 start_time
query_id 单条 SQL 标识;提供时优先做单条 SQL 分析

数据库由当前 profile 的 database 决定,无需也无法在命令上指定 --db-name;换库用 hologres config set database <db>--profile <name>

Installs
6
GitHub Stars
17
First Seen
May 11, 2026
hologres-slow-query-analysis — aliyun/hologres-ai-plugins