zOs/SQL/PDBGENXW
set current path oa1p;
set current schema = RZ2XX;
select count(*),
dec(avg(float(class1_elapsed)), 10, 6) avg,
min(class1_elapsed) "c1ElaMin",
max(class1_elapsed) "c1ElaMax",
fosFmte7(avg(CLASS3_SYNC_IO)) "syncIo",
fosFmte7(avg(CLASS3_Log_wrt_IO)) "logIo",
fosFmte7(avg(CLASS3_LOCK_LATCH)) "lockLat",
fosFmte7(avg(CLASS3_GLOBAL_CONT)) "gloCon",
fosFmtE7(avg(select)) "select",
fosFmtE7(avg(open)) "open",
fosFmtE7(avg(fetch)) "fetch",
fosFmtE7(avg(commit)) "commit",
fosFmtE7(avg(rollback)) "rollback",
fosFmtE7(avg(insert)) "insert",
fosFmtE7(avg(update)) "update",
fosFmtE7(avg(delete)) "delete",
min(occurrences) "occMin",
max(occurrences) "occMax",
min(timestamp) "from", max(timestamp) "to"
from TACCT_GENERAL g
where -- timestamp > current timestamp - 4 days
-- timestamp between '2011-01-23-09.53.00'
-- and '2011-01-23-09.54.43'
-- and class1_elapsed > 60
-- and rollback > 0
-- and ( corrName like 'QR00315%'
-- or corrName like 'QR00316%'
-- )
plan_name = 'WU0160'
-- and CLASS3_DRAIN_LOCK < 10
-- order by timestamp desc
-- order by class1_elapsed desc
-- group by floor(2*log10(class1_elapsed))
-- order by floor(2*log10(class1_elapsed))
with ur
;;;
select *
from RZ2XX.TACCT_GENERAL g
where plan_name like 'WU0160%'
and timestamp > '2011-02-17-00.00.00'
order by class2_elapsed desc
;x;
select class2_elapsed,
smallInt(1000* class2_cpu_total /class2_elapsed) cpu,
smallInt(1000* class3_global_cont /class2_elapsed) "gloCon",
smallInt(1000* class3_DB_IO /class2_elapsed) "db io",
smallInt(1000* class3_LOG_WRT_IO /class2_elapsed) "logIO",
smallInt(1000* (class2_cpu_total
+ class3_global_cont
+ class3_DB_IO
+ class3_LOG_WRT_IO ) /class2_elapsed) "sum",
g.*
from RZ2XX.TACCT_GENERAL g
where timestamp > trunc_timestamp(current timestamp - 1 DAY, 'DD')
-- and connect_id like 'MFT5614P%'
and connect_id like 'TNT780%'
and plan_name in ('TN7080')
-- and insert >= 1
ORDER BY timestamp desc
--ORDER BY CLASS1_ELAPSED desc
with ur
;
X
select insert, class2_elapsed / insert , class2_su_cpu / insert,
g.*
from RZ2XX.TACCT_GENERAL g
where timestamp > current timestamp - 9 DAY
and plan_name = 'RB5000'
and insert >= 1
ORDER BY Timestamp asc
;
X
select class2_elapsed / insert , class2_su_cpu / insert,
g.*
from RZ2XX.TACCT_GENERAL g
-- where timestamp > current timestamp - 1 month
where timestamp IN ('2010-02-02-01.05.50.881483'
,'2010-01-30-06.38.00.929757')
and plan_name = 'BE5020'
and insert > 500000 -- class2_elapsed >= 1000
order by 1 desc, class2_elapsed desc
;
select -- class2_elapsed / insert , class2_su_cpu / insert,
g.*
from RZ2XX.TACCT_GENERAL g
where timestamp > current timestamp - 5 DAY
and plan_name = 'RB5000'
ORDER BY Timestamp asc
;
X
select min(timestamp), max(timestamp)
from RZ2XX.TACCT_GENERAL g
with ur
;