Base Statistics, Metrics, and Statistics
Levels
Alternatively, the dba_hist_snapshot
table can be queried to retrieve the mapping between a
snap_id and the actual clock time. The number of days can be
entered to determine how many of the most recent days’ snapshots
are returned. The wrm$snapshot table can be queried to
determine which snap_id to choose. The begin_snap_id
and end_snap_id pair defines the time period over which
the report is generated. The filename is the user-specified name
given for the report.
The advantage of metrics is clear when it
is possible for the DBA to begin analysis of snapshots based on
when an activity was completed rather than having to redo the
activity in order to start and stop data collection. The next
section goes into more detail on the types of metrics that can
be tracked using AWR.
Statistics Collection Process
Oracle Database 10g metrics can be tracked
using AWR. The usage metrics are divided into two categories:
These metrics are helpful in determining
how often a particular feature is used, and helpful in
determining resource usage within the database.
MMON tracks and records the database
feature usage and HWM statistics on a weekly basis. The tracking
is based on a sampling mechanism of the data dictionary. These
statistics are recorded in AWR snapshots. The
dba_feature_usage_statistics view and the
dba_high_water_mark_statistics view can be queried to get
these statistics. The Enterprise Manager can also be used to
view the recorded statistics. Tables 4.1 and 4.2 describe the
columns available in the dba_feature_usage_statistics
view and the dba_high_water_mark_statistics view
respectively.