• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

WAITEVENT:latch:cachebufferschains

mysql 搞代码 4年前 (2022-01-09) 16次浏览 已收录 0个评论

关于CACHE BUFFERS CHAINS描述 CACHE BUFFERS CHAINS latch is acquired when searching for data blocks cached in the buffer cache. Since the Buffer cache is implemented as a sum of chains of blocks, each of those chains is protected by a child

关于CACHE BUFFERS CHAINS描述

CACHE BUFFERS CHAINS latch is acquired when searchingfor data blocks cachedin the buffer cache.Since the Buffer cache is implemented as asum of chains of blocks, each of those chains is protectedby a child of this latch when needs to be scanned. Contentionin this latch can be caused by very heavyaccess to a single block. This can require the application to be reviewed.

产生CACHE BUFFERS CHAINS原因

The main cause of the cache buffers chains latch contention is usually a hot block issue.This happens when multiple sessions repeatedly access one ormore blocks that are protectedby the same child cache buffers chains latch.

CACHE BUFFERS CHAINS 处理方法
1) Examine the application to see if the execution of certain DML and SELECT statements can be reorganized to eliminate contention on the object.

处理方法如下:--通过报告确定latch: cache buffers chains 等待 Top 5 Timed Events Avg %Total~~~~~~~~~~~~~~~~~~ wait CallEvent Waits Time (s) (ms) Time Wait Class------------------------------ ------------ ----------- ------ ------ ----------latch: cache buffers chains 74,642 35,421 475 6.1 ConcurrencCPUtime 11,422 2.0logfile sync 34,890 1,748 50 0.3 Commitlatchfree 2,279 774 340 0.1 Otherdbfile parallel write 18,818 768 41 0.1 System I/O------------------------------------------------------------- --找出逻辑读高sqlSQL ordered by Gets DB/Inst: Snaps: 1-2-> Resources reportedfor PL/SQLcode includes the resources used by all SQLstatements called by the code.-> Total Buffer Gets: 265,126,882-> Captured SQL accountfor 99.8% of Total Gets CPU ElapsedBuffer Gets Executions per Exec %Total Time (s) Time (s) SQL Id-------------- ------------ ------------ ------ -------- --------- ------------- 256,763,367 19,052 13,477.0 96.8######## ######### a9nchgksux6x2Module: JDBC Thin ClientSELECT * FROM SALES .... 1,974,516 987,056 2.0 0.7 80.31 110.94 ct6xwvwg3w0bvSELECT COUNT(*) FROM ORDERS .... --逻辑读大对象Segments by Logical Reads -> Total Logical Reads: 265,126,882-> Captured Segments accountfor 98.5% of Total Tablespace Subobject Obj. LogicalOwner Name Object Name Name Type Reads %Total---------- ---------- -------------------- ---------- ----- ------------ -------DMSUSER USERS SALES TABLE 212,206,208 80.04DMSUSER USERS SALES_PK INDEX 44,369,264 16.74DMSUSER USERS SYS_C0012345 INDEX 1,982,592 .75DMSUSER USERS ORDERS_PK INDEX 842,304 .32DMSUSER USERS INVOICES TABLE 147,488 .06 -------------------------------------------------------------处理思路:1.Lookfor SQL that accesses the blocksin question and determineif the repeated reads are necessary. This may be within a single session or across multiple本文来源gaodaimacom搞#^代%!码网@ sessions. 2.Checkfor suboptimal SQL (this is the most common cause of the events) lookat the execution plan forthe SQL being run and try to reduce the gets per executionswhich will minimize the number of blocks being accessed and therefore reduce the chances of multiple sessions contendingfor the same block.

搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:WAITEVENT:latch:cachebufferschains
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址