select /* MONITOR_AGENT */ con_id tenant_id, sum( value) from v$sysstat where stat_id IN (40000, 40002, 40004, 40006, 40008, 40018) and (con_id > 1000 or con_id = 1) and class < 1000 and con_id = 1;
SELECT /* MONITOR_AGENT */ con_id AS tenant_id, SUM(value) AS initial_value
FROM v$sysstat
WHERE stat_id IN (40000, 40002, 40004, 40006, 40008, 40018)
AND (con_id > 1000 OR con_id = 1)
AND class < 1000
AND con_id = 1;
等待 1 分钟:
等待 1 分钟,以便采集下一组数据。
采集后续数据:
再次使用相同的 SQL 语句采集后续的统计信息:
SELECT /* MONITOR_AGENT */ con_id AS tenant_id, SUM(value) AS final_value
FROM v$sysstat
WHERE stat_id IN (40000, 40002, 40004, 40006, 40008, 40018)
AND (con_id > 1000 OR con_id = 1)
AND class < 1000
AND con_id = 1;