Skip to content

V$METRIC - Real-Time Database Performance Metrics & Throughput

V$METRIC holds the most recent computed metric values for each metric in Oracle’s metric collection framework, covering the last completed 60-second (long duration) and 15-second (short duration) measurement intervals. DBAs use this view for lightweight real-time monitoring of key performance indicators — DB time per second, I/O throughput, redo generation rate, and user transactions per second — without the overhead of querying AWR or parsing raw cumulative statistics. The values are pre-computed rates, making them immediately actionable.

View Type: Dynamic Performance View Available Since: Oracle 10g R1 Required Privileges: SELECT on V_$METRIC or SELECT_CATALOG_ROLE or SELECT ANY DICTIONARY

ColumnDatatypeDescription
BEGIN_TIMEDATEStart timestamp of the measurement interval
END_TIMEDATEEnd timestamp of the measurement interval
INTSIZE_CSECNUMBERInterval size in centiseconds (6000 = 60 seconds, 1500 = 15 seconds)
GROUP_IDNUMBERMetric group identifier (2 = System Metrics Long, 3 = System Metrics Short)
METRIC_IDNUMBERUnique numeric identifier for the metric
METRIC_NAMEVARCHAR2(64)Human-readable name of the metric
VALUENUMBERComputed metric value for the interval
METRIC_UNITVARCHAR2(64)Unit of measure (e.g., “per second”, “percent”, “microseconds”)
CON_IDNUMBERContainer ID (12c+); 0 = CDB-wide or non-CDB

List all current metrics with their values and units, sorted by metric name:

SELECT
group_id,
metric_id,
metric_name,
ROUND(value, 4) AS value,
metric_unit,
begin_time,
end_time
FROM
v$metric
ORDER BY
metric_name;

Key System Metrics — Current DB Time and CPU Rate

Section titled “Key System Metrics — Current DB Time and CPU Rate”

Retrieve the most critical performance indicators in a single query. These five metrics give an immediate pulse of database workload:

SELECT
metric_name,
ROUND(value, 4) AS value,
metric_unit,
begin_time,
end_time,
ROUND(intsize_csec / 100, 0) AS interval_seconds
FROM
v$metric
WHERE
group_id = 2 -- System Metrics Long Duration (60-second intervals)
AND metric_name IN (
'DB Time Per Sec',
'DB CPU Time Per Sec',
'User Transaction Per Sec',
'User Calls Per Sec',
'SQL Service Response Time'
)
ORDER BY
metric_name;

Monitoring Query — I/O Throughput and Redo Rate

Section titled “Monitoring Query — I/O Throughput and Redo Rate”

Monitor storage and redo subsystem performance in real time. Spikes in physical I/O or redo generation often precede space or performance incidents:

SELECT
metric_name,
ROUND(value, 2) AS value,
metric_unit,
begin_time,
end_time
FROM
v$metric
WHERE
group_id = 2
AND metric_name IN (
'Physical Reads Per Sec',
'Physical Writes Per Sec',
'Physical Read Bytes Per Sec',
'Physical Write Bytes Per Sec',
'Redo Generated Per Sec',
'Redo Generated Per Transaction',
'Logons Per Sec',
'Open Cursors Per Sec'
)
ORDER BY
metric_name;

Combined with Other Views — Metric History from AWR

Section titled “Combined with Other Views — Metric History from AWR”

Join V$METRIC with DBA_HIST_SYSMETRIC_SUMMARY to compare the current interval against the historical average and flag anomalies. Requires the Diagnostics Pack license:

SELECT
m.metric_name,
ROUND(m.value, 2) AS current_value,
m.metric_unit,
ROUND(h.average, 2) AS hist_avg,
ROUND(h.maxval, 2) AS hist_max,
ROUND(
(m.value - h.average) /
NULLIF(h.average, 0) * 100, 1
) AS pct_above_avg
FROM
v$metric m
JOIN (
SELECT
metric_name,
AVG(average) AS average,
MAX(maxval) AS maxval
FROM
dba_hist_sysmetric_summary
WHERE
begin_time >= SYSDATE - 7 -- last 7 days
GROUP BY
metric_name
) h ON h.metric_name = m.metric_name
WHERE
m.group_id = 2
ORDER BY
ABS(m.value - h.average) / NULLIF(h.average, 0) DESC NULLS LAST
FETCH FIRST 20 ROWS ONLY;

Advanced Analysis — Short vs. Long Duration Comparison

Section titled “Advanced Analysis — Short vs. Long Duration Comparison”

Compare the 15-second (short) and 60-second (long) metric intervals to detect transient spikes that the longer window smooths out. A large difference indicates a recent burst of activity:

SELECT
long_m.metric_name,
ROUND(long_m.value, 4) AS long_60s_value,
ROUND(short_m.value, 4) AS short_15s_value,
long_m.metric_unit,
CASE
WHEN long_m.value = 0 THEN NULL
ELSE ROUND((short_m.value - long_m.value) / long_m.value * 100, 1)
END AS pct_diff
FROM
v$metric long_m
JOIN v$metric short_m
ON short_m.metric_name = long_m.metric_name
AND short_m.group_id = 3 -- Short Duration (15s)
WHERE
long_m.group_id = 2 -- Long Duration (60s)
AND long_m.metric_name IN (
'DB Time Per Sec',
'DB CPU Time Per Sec',
'Physical Reads Per Sec',
'Physical Writes Per Sec',
'Redo Generated Per Sec',
'User Transaction Per Sec',
'SQL Service Response Time',
'Network Bytes Per Sec'
)
ORDER BY
ABS(
COALESCE((short_m.value - long_m.value) / NULLIF(long_m.value, 0), 0)
) DESC;
SELECT
metric_name,
ROUND(value, 2) AS value,
metric_unit,
begin_time
FROM
v$metric
WHERE
group_id = 2
AND metric_name IN (
'Network Bytes Per Sec',
'Network Receives Per Sec',
'Network Sends Per Sec',
'Current OS Load',
'CPU Usage Per Sec',
'CPU Usage Per Transaction',
'Active Sessions',
'Active Parallel Sessions',
'Background CPU Time Per Sec'
)
ORDER BY
metric_name;
  • Real-time DB time monitoringDB Time Per Sec above 1.0 means Oracle is consuming more than one CPU-equivalent of work per second; above NUM_CPUS indicates saturation.
  • Transaction throughput baselineUser Transaction Per Sec and User Calls Per Sec establish the application’s steady-state load; sudden drops signal connection or application problems.
  • SQL service response time alertingSQL Service Response Time (microseconds) is the end-user-visible latency metric; trending upward without a load increase indicates degradation.
  • Redo generation spikes — Sudden increases in Redo Generated Per Sec can indicate bulk DML, uncommitted large transactions, or log archiving bottlenecks.
  • I/O throughput capacity planning — Track Physical Read Bytes Per Sec and Physical Write Bytes Per Sec against storage subsystem limits to predict when additional storage bandwidth will be needed.
  • OEM-independent dashboards — Feed V$METRIC into custom monitoring scripts or third-party tools (Grafana, Nagios) when OEM is not available.
GROUP_IDNameInterval
2System Metrics Long Duration60 seconds
3System Metrics Short Duration15 seconds
6Event Metrics60 seconds
7Event Class Metrics60 seconds
9Service Metrics60 seconds
  • V$METRICNAME — Lookup table mapping METRIC_ID and GROUP_ID to METRIC_NAME and METRIC_UNIT; useful for translating numeric IDs.
  • V$METRIC_HISTORY — Recent history of metric values (approximately the last hour) kept in the SGA; use when AWR is unavailable.
  • V$SYS_TIME_MODEL — Cumulative time model statistics; DB Time Per Sec in V$METRIC is derived from the delta of V$SYS_TIME_MODEL DB time.
  • V$SYSMETRIC_HISTORY — System metric history kept in memory; equivalent to V$METRIC_HISTORY but specifically for system-level metrics.
  • V$OSSTAT — OS-level CPU and memory statistics; compare CPU Usage Per Sec in V$METRIC against OS BUSY_TIME for full-stack analysis.
  • Oracle 10g R1: V$METRIC introduced as part of the Metrics framework supporting the Database Control performance pages.
  • Oracle 10g R2: Additional I/O metrics added (bytes per second variants); metric groups 6 and 7 (wait event and event class metrics) added.
  • Oracle 11g: SQL Service Response Time and network metrics added; V$METRIC_HISTORY retention extended.
  • Oracle 12c R1: CON_ID column added; metrics collected per-PDB when ENABLE_PER_PDB_METRICS is set. V$CON_SYSMETRIC provides PDB-level equivalents.
  • Oracle 19c: No structural changes; metric collection is a core background activity unaffected by patch level.
  • Oracle 21c / 23ai: Additional metrics related to Automatic Indexing activity and In-Memory advisor available in the metric framework.