conn hr/hr set timing on set serveroutput on declare procedure step_1 is usermsg message_t := message_t(123456790, 'TONGUC DEMO', SYSDATE); begin for i in 1 .. 1000 loop pkg_queue.prc_enqueue(usermsg => usermsg); pkg_queue.prc_dequeue; end loop; end; procedure step_2 is usermsg message_t := message_t(123456790, 'TONGUC DEMO', SYSDATE); begin for i in 1 .. 1000 loop pkg_iot.prc_enqueue(usermsg => usermsg); pkg_iot.prc_dequeue; end loop; end; begin runstats_pkg.rs_start; step_1; runstats_pkg.rs_middle; step_2; runstats_pkg.rs_stop(10000); end; / Run1 ran in 336 hsecs Run2 ran in 166 hsecs run 1 ran in 202,41% of the time Name Run1 Run2 Diff LATCH.library cache pin 18,284 8,035 -10,249 STAT...session logical reads 18,833 29,259 10,426 STAT...no work - consistent re 1,466 14,086 12,620 STAT...db block changes 24,179 9,155 -15,024 LATCH.library cache 24,560 9,051 -15,509 STAT...consistent gets 1,554 20,121 18,567 STAT...consistent gets from ca 1,554 20,121 18,567 LATCH.row cache objects 19,158 59 -19,099 STAT...IMU Redo allocation siz 60,528 0 -60,528 STAT...session uga memory max 261,964 196,488 -65,476 STAT...session pga memory max 262,144 196,608 -65,536 STAT...session pga memory 196,608 131,072 -65,536 STAT...session uga memory 196,488 65,560 -130,928 STAT...undo change vector size 1,007,028 342,424 -664,604 STAT...redo size 3,007,072 1,105,332 -1,901,740 STAT...IMU undo allocation siz 3,141,608 779,680 -2,361,928 Run1 latches total versus runs -- difference and pct Run1 Run2 Diff Pct 244,335 158,479 -85,856 154.18% PL/SQL procedure successfully completed. Elapsed: 00:00:05.13