DB2 Version 9.7 for Linux, UNIX, and Windows

rows_read - Rows read monitor element

The number of rows read from the table.

Table 2. Snapshot Monitoring Information
Snapshot Level Logical Data Grouping Monitor Switch
Database dbase Basic
Table table Table
Application appl Basic
Application stmt Basic
Application subsection Statement
Dynamic SQL dynsql Statement
For snapshot monitoring, this counter can be reset.
Table 3. Event Monitoring Information
Event Type Logical Data Grouping Monitor Switch
Activities event_activity (reported in the details_xml document) ACTIVITY METRICS BASE
Activities event_activitymetrics ACTIVITY METRICS BASE
Statistics event_scstats (reported in the metrics document) REQUEST METRICS BASE
Statistics event_wlstats (reported in the metrics document) REQUEST METRICS BASE
Unit of work Reported in the system_metrics document. REQUEST METRICS BASE
Connection event_conn -
Tables event_table -
Statements event_stmt -
Transactions event_xact -
Package cache Reported in the activity_metrics document. ACTIVITY METRICS BASE
Statistics event_scmetrics* REQUEST METRICS BASE
Statistics event_wlmetrics* REQUEST METRICS BASE
* When returned as part of this logical data group, this element reflects the change in value of this metric since the last statistics collection or database activation, whichever was more recent.

Usage

This element helps you identify tables with heavy usage for which you may want to create additional indexes. To avoid the maintenance of unnecessary indexes, use the SQL EXPLAIN statement to determine if the package uses an index.

This count is not the number of rows that were returned to the calling application. Rather, it is the number of rows that had to be read in order to return the result set. For example, the following statement returns one row to the application, but many rows are read to determine the average salary:
 
     SELECT AVG(SALARY) FROM USERID.EMPLOYEE

This count includes the value in the overflow_accesses monitor element. Additionally, this count does not include any index accesses. That is, if an access plan uses index access only and the table is not touched to look at the actual row, then the value of the rows_read monitor element is not incremented.