Data Statistics

The system catalog tables contain information about columns, tables, and indexes. They contain such information as the number of rows in a table, the use of space by a table or index, and the number of different values in a column.

However, this information is not kept current. It has to be generated by a utility called RUNSTATS. The statistics collected by the RUNSTATS utility can be used in two ways: to display the physical organization of the data and to provide information that the DB2 optimizer needs to select the best access path for executing SQL statements.

To have efficient access paths to data, current statistics must exist that reflect the actual state of your tables, columns, and indexes. Whenever a dynamic SQL statement ...

Get DB2® Universal Database for OS/390® Version 7.1 Certification Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.