Advertisement
ExaGridDba

v$latch summarizes v$latch_children

Oct 17th, 2015
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SQL*Plus: RELEASE 12.1.0.2.0 Production ON Sat Oct 17 14:42:21 2015
  2.  
  3. Copyright (c) 1982, 2014, Oracle.  ALL rights reserved.
  4.  
  5.  
  6. Connected TO:
  7. Oracle DATABASE 12c Enterprise Edition RELEASE 12.1.0.2.0 - 64bit Production
  8. WITH the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
  9. AND REAL Application Testing options
  10.  
  11. SQL>
  12. SQL> SELECT l.latch#, l.hash
  13.   2  FROM v$latch l
  14.   3  WHERE l.name = 'cache buffers chains'
  15.   4  ;
  16.  
  17.     LATCH#       HASH
  18. ---------- ----------
  19.        228 3563305585
  20.  
  21. SQL>
  22. SQL> SELECT
  23.   2  lc.latch#,
  24.   3  lc.hash,
  25.   4  COUNT( DISTINCT lc.addr ),
  26.   5  COUNT(*),
  27.   6  MAX(lc.child#),
  28.   7  lc.con_id
  29.   8  FROM v$latch_children lc
  30.   9  WHERE lc.name = 'cache buffers chains'
  31.  10  GROUP BY lc.latch#, lc.hash, lc.con_id
  32.  11  ;
  33.  
  34.     LATCH#       HASH COUNT(DISTINCTLC.ADDR)   COUNT(*) MAX(LC.CHILD#)     CON_ID
  35. ---------- ---------- ---------------------- ---------- -------------- ----------
  36.        228 3563305585                  65536      65536          65536          0
  37.  
  38. SQL>
  39. SQL> SELECT l.gets, l.misses, l.sleeps, l.immediate_gets, l.immediate_misses, l.spin_gets, l.wait_time
  40.   2  FROM v$latch l
  41.   3  WHERE l.name = 'cache buffers chains'
  42.   4  ;
  43.  
  44.       GETS     MISSES     SLEEPS IMMEDIATE_GETS IMMEDIATE_MISSES  SPIN_GETS  WAIT_TIME
  45. ---------- ---------- ---------- -------------- ---------------- ---------- ----------
  46.  687328579          7          6        1124332                2          1       2998
  47.  
  48. SQL>
  49. SQL> SELECT
  50.   2  SUM( lc.gets),
  51.   3  SUM( lc.misses),
  52.   4  SUM( lc.sleeps),
  53.   5  SUM( lc.immediate_gets),
  54.   6  SUM( lc.immediate_misses),
  55.   7  SUM( lc.spin_gets),
  56.   8  SUM( lc.wait_time)
  57.   9  FROM v$latch_children lc
  58.  10  WHERE lc.name = 'cache buffers chains'
  59.  11  GROUP BY lc.latch#, lc.hash, lc.con_id
  60.  12  ;
  61.  
  62. SUM(LC.GETS) SUM(LC.MISSES) SUM(LC.SLEEPS) SUM(LC.IMMEDIATE_GETS) SUM(LC.IMMEDIATE_MISSES) SUM(LC.SPIN_GETS) SUM(LC.WAIT_TIME)
  63. ------------ -------------- -------------- ---------------------- ------------------------ ----------------- -----------------
  64.    687328331              7              6                1124332                        2                 1              2998
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement