zoukankan      html  css  js  c++  java
  • buffer pool latch和cache buffers chains latch

    <pre name="code" class="sql">buffer pool latch 是用来保护buffer pool的
    每个buffer pool有一个buffer pool latch保护
    SQL> select addr,LATCH#,LEVEL#,CHILD#,NAME from v$latch_children where name='buffer pool';
    
    ADDR	     LATCH#	LEVEL#	   CHILD# NAME
    -------- ---------- ---------- ---------- ----------------------------------------------------------------
    2CD760A8	146	     1		8 buffer pool
    2CD75F78	146	     1		7 buffer pool
    2CD75E48	146	     1		6 buffer pool
    2CD75D18	146	     1		5 buffer pool
    2CD75BE8	146	     1		4 buffer pool
    2CD75AB8	146	     1		3 buffer pool
    2CD75988	146	     1		2 buffer pool
    2CD75858	146	     1		1 buffer pool
    
    已选择8行。
    
    
    cache buffers chains latch是用来保护 hash  buckets:
    
    
    SQL> SELECT x.ksppinm NAME, y.ksppstvl VALUE, x.ksppdesc describ
      FROM x$ksppi x, x$ksppcv y
     WHERE x.inst_id = USERENV('Instance')
       AND y.inst_id = USERENV('Instance')
       AND x.indx = y.indx
       AND x.ksppinm LIKE '%_db_block_hash%'  2    3    4    5    6  ;
    
    
    NAME       VALUE DESCRIB
    ------------------------------ ---------- ------------------------------
    _db_block_hash_buckets       16384 Number of database block hash  buckets
    
    
    _db_block_hash_latches       1024 Number of database block hash  Latches
    
    
    可以用下面查询计算cache buffers chains latch的数量:
    SQL> select count(*) from v$latch_children a,v$latchname b where a.latch#=b.latch# and b.name='cache buffers chains';
    
    
      COUNT(*)
    ----------
          1024
    
    
    根据我们的查询,那么一个cache buffers chains latch 平均下来要管理
    Select 16384/1024 from dual 16个块.


    
                                        
    
  • 相关阅读:
    Gym102501G Swapping Places(拓扑排序)
    2019SWERC题解
    CF364D Ghd(随机化)
    CF500E New Year Domino(并查集+栈)
    CF280C Game on Tree(期望)
    CF1093G Multidimensional Queries(线段树)
    CF677D Vanya and Treasure(最短路)
    CF788C The Great Mixing(最短路)
    queryset高级用法:prefetch_related
    queryset高级用法:select_related
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13351995.html
Copyright © 2011-2022 走看看