Active Session History Statistics

The Active Session History (ASH) statistics are samples of session activity in the database. The database samples active sessions every second and stores them in a circular buffer in the System Global Area (SGA). Any session that is connected to the database and using CPU, or is waiting for an event that does not belong to the idle wait class, is considered an active session. By capturing only active sessions, a manageable set of data is represented. The size of the data is directly related to the work being performed, rather than the number of sessions allowed on the database.

Using the DB time example described in “Time Model Statistics”, samples of session activity are collected from the online transaction made at the bookseller’s website, represented as vertical lines below the horizontal arrow in Figure 2-3.

Figure 3: Active Session History

Description of the illustration tdppt003.gif

The light vertical lines represent samples of inactive session activity that are not captured in the ASH statistics. The bold vertical lines represent samples of active sessions that are captured at:

Table 2-1 lists ASH statistics collected for the active sessions, along with examples of the session ID (SID), module, SQL ID, session state, and wait events that are sampled.

Table 1 Active Session History

Time SID Module SQL ID State Event
7:38 213 Book by author qa324jffritcf Waiting db file sequential read
7:42 213 Get review ID aferv5desfzs5 CPU n/a
7:50 213 Add item to cart hk32pekfcbdfr Waiting buffer busy wait
7:52 213 Checkout abngldf95f4de Waiting log file sync