Interval records
Interval record is a term for a set of counters that describes the activity of a Db2 system in a user-specified period of time.
Unlike the delta record, where the time interval is determined by two consecutive Db2 Statistics record pairs, you can specify the duration of an interval record by using the INTERVAL subcommand option of the REDUCE subcommand.
Interval records do not generally coincide with the delta records. Several delta records can be contained in one interval record. The interval records are not generally aligned with the delta records. The delta records are aligned with Db2 Statistics record pairs, while you can align the interval record by using the BOUNDARY subcommand option of the REDUCE subcommand.
When an interval record is calculated, OMEGAMON for Db2 Performance Expert externalizes it to Statistics reports and Save data sets depending on your specification.
To understand the relationship between the delta records and interval records, consider the following example taken from a Db2 10 subsystem.
The Db2 Statistics record pairs are generated every minute. IFCID 225 and IFCID 369 are also externalized every minute, while the generation of IFCID 199 is controlled by Db2 system parameter STATIME. If a Statistics trace is started at 9:15 and stopped at 10:15, 61 Db2 Statistics record pairs are generated.
OMEGAMON for Db2 Performance Expert processes these record pairs and creates 60 one-minute delta records starting every minute from 9:15 to 10:14. You can print these delta records by specifying the TRACE subcommand or store these delta records in a data set that is suitable for loading into Db2 tables by specifying the FILE subcommand.
If you need a report by an hourly basis, you can specify an interval record duration of 60 minutes by using the INTERVAL subcommand option of REDUCE. By default, the interval records are aligned with hour boundaries. If you require a different alignment, use the BOUNDARY subcommand option. Based on this specification, OMEGAMON for Db2 PE uniformly distributes the already calculated one-minute delta records into the corresponding interval records. Two 60-minute interval records are created starting at 9:00 and 10:00. The first interval record contains the delta records from 9:15 to 10:00 and the second interval record contains the delta records from 10:00 to 10:15. You can print these interval records by specifying the REPORT subcommand or store these interval records into a data set for later use by specifying the SAVE subcommand.
A counter in the interval record, like the counters in the delta records, is provided in one of the following forms:
- Accumulated value. For example, the total number of SELECT statements that were executed during the period of time specified for the interval record. Generally, this value is an approximation because the interval records are not aligned with the delta records. When an interval record crosses delta record boundaries, and vice versa, the values of the delta record counters are apportioned and uniformly distributed into overlapping interval records.
- The current or snapshot value is an approximation of the counter value at the end of the interval record. It is derived from the delta records' current values and is weighted according to the overlap between the delta records and the interval records.
- The maximum or high-water mark value the counter has reached between the time the system was last started and the end of the last delta record included in the interval record calculation.
To produce a report that shows the Statistics data for each interval record, you first specify the interval-record duration and alignment with the INTERVAL and BOUNDARY subcommand options of the REDUCE subcommand, then the ORDER(INTERVAL) subcommand option of the REPORT subcommand.
A special type of the Statistics report is one where all Db2 Statistics record pairs in the input data set are consolidated in one interval record. Such a report is produced if no INTERVAL subcommand option is specified and the default INTERVAL(0) is assumed. In this case, the BOUNDARY and ORDER(INTERVAL) subcommand options do not apply. The start of the interval record is aligned to the first Db2 Statistics record pair, and there is no ordering by intervals because only one interval record is created. For example, if a Statistics trace is started at 9:15 and ended at 11:15, one interval record for that period is created that contains all counters pertinent to that interval, such as the number of INSERT statements executed from 9:15 to 11:15.