Listing 7: Statistics and Latches for No Binds Versus Binds Test

  


SQL> select a.name, b.value-a.value run1, c.value-b.value run2,
  2         ( (c.value-b.value)-(b.value-a.value)) diff
  3    from run_stats a, run_stats b, run_stats c
  4   where a.name = b.name
  5     and b.name = c.name

  6     and a.runid = 'before'
  7     and b.runid = 'after 1'
  8     and c.runid = 'after 2'
  9     and (c.value-a.value) > 0
 10     and (c.value-b.value) <> (b.value-a.value)
 11   order by abs( (c.value-b.value)-(b.value-a.value))

 12  /

NAME                               RUN1    RUN2    DIFF
————————————————————————————      —————   —————   —————
...
LATCH.cache buffers chains         8621    8222    -399
STAT...recursive calls             2002    1184    -818

STAT...parse count (hard)          1007    5       -1002
STAT...opened cursors cumulative   1034    15     -1019
STAT...parse count (total)         1048    15     -1033
STAT...session pga memory max      6656    8524    1868
LATCH.row cache objects            6254    115    -6139
STAT...session pga memory          15144   8524   -6620
LATCH.library cache                21344   2269   -19075
LATCH.shared pool                  24098   131    -23967


51 rows selected.