negative values in STATSPACK Reportgreenspun.com : LUSENET : DBAzine : One Thread |
Hi all !!! Got a doubt. This pertains to a STATSPACK report(rpt_avg_io_dy.sql). set pages 9999;select to_char(snap_time,'day'), avg(newreads.value-oldreads.value) reads, avg(newwrites.value-oldwrites.value) writes from perfstat.stats$sysstat oldreads, perfstat.stats$sysstat newreads, perfstat.stats$sysstat oldwrites, perfstat.stats$sysstat newwrites, perfstat.stats$snapshot sn where newreads.snap_id = sn.snap_id and newwrites.snap_id = sn.snap_id and oldreads.snap_id = sn.snap_id-1 and oldwrites.snap_id = sn.snap_id-1 and oldreads.statistic# = 40 and newreads.statistic# = 40 and oldwrites.statistic# = 41 and newwrites.statistic# = 41 having avg(newreads.value-oldreads.value) > 0 and avg(newwrites.value-oldwrites.value) > 0 group by to_char(snap_time,'day') ; Returns
TO_CHAR(S READS WRITES --------- ------------ ------------ friday 3,821,008 329,839
BUT
select to_char(snap_time,'dd/mon/day'), avg(newreads.value-oldreads.value) reads, avg(newwrites.value-oldwrites.value) writes from perfstat.stats$sysstat oldreads, perfstat.stats$sysstat newreads, perfstat.stats$sysstat oldwrites, perfstat.stats$sysstat newwrites, perfstat.stats$snapshot sn where newreads.snap_id = sn.snap_id and newwrites.snap_id = sn.snap_id and oldreads.snap_id = sn.snap_id-1 and oldwrites.snap_id = sn.snap_id-1 and oldreads.statistic# = 40 and newreads.statistic# = 40 and oldwrites.statistic# = 41 and newwrites.statistic# = 41 -- having -- avg(newreads.value-oldreads.value) > 0 -- and -- avg(newwrites.value-oldwrites.value) > 0 group by to_char(snap_time,'dd/mon/day') / Returns TO_CHAR(SNAP_TIM READS WRITES ---------------- ------------ ------------ 01/sep/monday -3,129,848 34,835 22/aug/friday 5,193,885 693,816 23/aug/saturday -83,693 -281,275 24/aug/sunday -408,636 -183,095 25/aug/monday -747,489 209,275 26/aug/tuesday -2,340,919 -106,050 27/aug/wednesday -356,421 21,424 28/aug/thursday -1,267,733 -89,861 29/aug/friday 3,101,882 139,184 30/aug/saturday -5,172,168 -283,672 31/aug/sunday -1,633,796 -162,715
I'm confused. Kindly suggest what does this mean ????
Thanks n Rgds Sanji
-- SANJEEV SURI (sanji_aqua@yahoo.com), September 01, 2003