Re: Enetrprise Manager CPU Sampling and Mesurement

From: Ls Cheng <exriscer_at_gmail.com>
Date: Tue, 12 Nov 2013 21:35:42 +0100
Message-ID: <CAJ2-Qb9pSFAyoV4Z7K7xN1hbbXZZ8_AkBm1CTSWBPpy_fuMoWQ_at_mail.gmail.com>



I think I found what I was looking at in this MOS note

Insert Into mgmt_metrics_1hour Takes Long Time to Complete and Degrades Repository Database Performance (Doc ID 1128310.1)

Show this insert-select which get the average, min, max and stddev

INSERT INTO mgmt_metrics_1hour h

SELECT /*+ cardinality (p,3) FULL(p) */ t.target_guid,
                                        t.metric_guid,
                                        t.key_value,
                                        Trunc(t.collection_timestamp,
'HH24'),
                                        COUNT(t.target_guid),
                                        Avg(t.VALUE),
                                        MIN(t.VALUE),
                                        MAX(t.VALUE),
                                        Stddev(t.VALUE)
FROM   mgmt_metrics_raw t,
       mgmt_target_list_temp p
WHERE  t.target_guid = p.target_guid
       AND t.collection_timestamp >= p.rollup_timestamp
       AND t.collection_timestamp < p.cur_hour_rollup
       AND p.rollup_table_name = 'MGMT_METRICS_1HOUR'
       AND t.VALUE IS NOT NULL
       AND p.inst_id = :B3
       AND p.worker_id = :B2
       AND p.batch_id = :B1
       AND p.status = 'R'
GROUP  BY t.target_guid,
          t.metric_guid,
          t.key_value,
          Trunc(t.collection_timestamp, 'HH24')

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Nov 12 2013 - 21:35:42 CET

Original text of this message