GaussDB T 基础入门:等待事件 的分类和数量等

网友投稿 820 2022-05-29

等待事件是会话等待某个系统行为发生的事件。等待事件可能由许多因素引起,从磁盘上的慢速读/写,到架构引起的锁定情况,到各种系统资源争用。

等待是系统级或会话级的。会话级等待事件是影响数据库中单个用户活动的事件。系统级等待事件会影响整个数据库系统。用户可通过对等待事件进行分析来定位系统性能问题。

GaussDB T 提供了总共7大类等待事件:Idle、Concurrency、Other、Commit、Application、User I/O、Configuration,总共31种等待事件。

可通过DV_SESSION_EVENTS、DV_SESSION_WAITS查询会话级等待事件的统计信息,可通过DV_SYS_EVENTS查询系统级等待事件的统计信息。

GaussDB T 基础入门:等待事件 的分类和数量等

Name                                Null?    Type                                 ----------------------------------- -------- ------------------------------------ EVENT#                              NOT NULL BINARY_INTEGER                       EVENT                               NOT NULL VARCHAR(64 BYTE)                     P1                                 NOT NULL VARCHAR(64 BYTE)                     WAIT_CLASS                            NOT NULL VARCHAR(64 BYTE)                     TOTAL_WAITS                            NOT NULL BINARY_BIGINT                        TIME_WAITED                            NOT NULL BINARY_BIGINT                        TIME_WAITED_MIRCO                         NOT NULL BINARY_BIGINT                        AVERAGE_WAIT                           NOT NULL BINARY_DOUBLE                        AVERAGE_WAIT_MIRCO                        NOT NULL BINARY_BIGINT                        SQL> select count(*) from DV_SYS_EVENTS; COUNT(*)             -------------------- 31                   1 rows fetched. SQL> select event ,wait_class from dv_sys_events; EVENT                                                            WAIT_CLASS                                                       ---------------------------------------------------------------- ---------------------------------------------------------------- idle wait                                                        Idle                                                             message from client                                                   Idle                                                             message to client                                                    Idle                                                             latch: large pool                                                    Concurrency                                                      latch: sql pool                                                     Concurrency                                                      latch: lock pool                                                     Concurrency                                                      latch: dictionary pool                                                  Concurrency                                                      latch: data buffer pool                                                 Concurrency                                                      latch: cache buffers chains                                               Concurrency                                                      cursor: mutex                                                      Other                                                            library : mutex                                                     Other                                                            log file sync                                                      Commit                                                           buffer busy waits                                                    Concurrency                                                      enq: TX row lock contention                                               Application                                                      enq: TX alloc itl entry                                                 Concurrency                                                      enq: TX index contention                                                 Application                                                      enq: TX table lock S                                                   Application                                                      enq: TX table lock X                                                   Application                                                      enq: TX read  wait                                                   Application                                                      db file scattered read                                                  User/IO                                                          db file sequential read                                                 User/IO                                                          log file switch(checkpoint incomplete)                                          Configuration                                                    log file switch(archiving needed)                                            Configuration                                                    read by other session                                                  Concurrency                                                      attached to agent                                                    Idle                                                             heap find map                                                      Concurrency                                                      heap extend segment                                                   Concurrency                                                      resmgr: io quantum                                                    User/IO                                                          direct path read temp                                                  User/IO                                                          direct path write temp                                                  User/IO                                                          advisory lock wait time                                                 Concurrency                                                      31 rows fetched. SQL>

转自墨天轮

GaussDB

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:绝了,华为云服务器“The 3”出道,每款都很能打
下一篇:《Word/Excel/PPT 2019完全自学教程 : 视频讲解版 》 — 2.1.2 插入特殊符号
相关文章