GreenPlum中如何通过SQL查询历史SQL语句的查询ID、排队时间、运行时间、CPU、磁盘等情况

0    248    2

Tags:

👉 本文共约2655个字,系统预计阅读时间或需10分钟。

SQL语句

切换到gpperfmon数据库,做如下查询:

一些指标

Query ID

An identification string for the query. If the column is blank, no query ID has been assigned yet. In the Console, this looks like “1295397846-56415-2”. Command Center generates this ID by combining the query record’s tmid, ssid, and ccnt fields.

  • tmid is a time identifier for the query.
  • ssid is the session id.
  • ccnt is the number of the command within the session.

Status

The status of the query. This can be one of the following:

  • Queued: the query has not yet started to execute
  • Running: execution has started, but is not yet complete
  • Blocked: the query is waiting for one or more other queries to release locks
  • Done: completed successfully
  • Cancelling: cancel request sent, cancel pending
  • Cancelled: terminated, no longer running
  • Idle Transaction: the transaction is open, but idle, for example, waiting while a user in an interactive session enters a statement

Submitted

本人提供Oracle(OCP、OCM)、MySQL(OCP)、PostgreSQL(PGCA、PGCE、PGCM)等数据库的培训和考证业务,私聊QQ646634621或微信dbaup66,谢谢!
AiDBA后续精彩内容已被站长无情隐藏,请输入验证码解锁本文!
验证码:
获取验证码: 请先关注本站微信公众号,然后回复“验证码”,获取验证码。在微信里搜索“AiDBA”或者“dbaup6”或者微信扫描右侧二维码都可以关注本站微信公众号。

标签:

Avatar photo

小麦苗

学习或考证,均可联系麦老师,请加微信db_bao或QQ646634621

您可能还喜欢...

发表回复