Files
oracle/tpt/awr/awr_sysmetric_history.sql

25 lines
615 B
MySQL
Raw Normal View History

2026-03-12 21:23:47 +01:00
-- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
SELECT
-- CAST(begin_interval_time AS DATE) begin_time
begin_time
, metric_name
, metric_unit
, value
FROM
dba_hist_snapshot
NATURAL JOIN
dba_hist_sysmetric_history
WHERE
metric_name LIKE '&1'
-- metric_name IN ('Physical Reads Per Sec')
-- metric_name IN ('Host CPU Utilization (%)')
-- metric_name IN ('Logons Per Sec')
AND begin_interval_time > SYSDATE - 1
ORDER BY
metric_name
, begin_time
/