At the top of every Oracle AWR report, there’s an important metric called “Sessions”, which represents the number of sessions at the time each snapshot (Snap ID) is being taken.

This value comes from the logons current statistic in the DBA_HIST_SYSSTAT table.
Let’s take a closer look at how Oracle obtains this value through a simple experiment:
SELECT COUNT(*) FROM V$SESSION;
SELECT value FROM V$SYSSTAT WHERE NAME = 'logons current';
EXEC DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT();
SELECT VALUE
FROM DBA_HIST_SYSSTAT
WHERE STAT_NAME = 'logons current'
AND SNAP_ID = (SELECT MAX(SNAP_ID) FROM DBA_HIST_SNAPSHOT);

This experiment shows that the “Sessions” value in the AWR report corresponds to the exact number of active sessions at the moment the snapshot is being taken.
It is not an average nor an aggregated value over the snapshot interval.
That’s the key takeaway: while most AWR metrics represent averages or totals over time, the Sessions metric is a point-in-time value, and it can fluctuate significantly during the snapshot interval.





Leave a comment