-- (c) Kyle Hailey 2007


From Statspack, 
Over 12 hours ASH simulation used 73.56 secs of CPU
73.56/(12*60*60) = 0.001
or 0.1% of one CPU
                             CPU
Buffer Gets Execs Gets/Exec Time(s) Hash Value
----------- ----- --------- ------- ----------
   121,020     12  13,446.7   56.68 4116021597   ash.collect(3,1200)
   130,089     12  10,840.8   16.88 1527641927   ash.get_all


9i database 
1 average active session
3 seconds interval for sampling
 
I often use 1 second sampling which would up the amount of CPU obviously

FUTURE
--------
The main work is selecting from v$session joined to v$session_wait
In 10g, we no longer needs this join. All the v$session_wait data
is available directly in v$session. Changing the the base
query to just look at v$session without
joining to v$session_wait saves a good bit of CPU percentage wise.

changed in lates ashpack.sh  to just use v$session for 10g databases
ashpack.sh July 30, 07 
but haven't measure the impact emperically yet, though I have noticed a big decrease in CPU just scanning the stats