Log Table for Update Statistics with SAPDBA
Definition
The log table
DBSTATTINF contains details of update statistics.Use
Every time you run update statistics with SAPDBA for Informix,
DBSTATTINF is updated with details of the tables that have been checked and of the tables that have had new statistics generated.Structure
One row is updated in
DBSTATTINF for each table processed by update statistics. The most important fields for this are as follows:Field |
Comment |
tabname |
Table name |
lupdstat |
Date and time of the last update statistics with SAPDBA. Format: yyyymmddhhmm |
cupdstat |
Date of the last "check statistics" |
threshold |
Threshold for the update statistics — in other words, the percentage deviation between the statistics and the current (that is, correct) number of rows in the table |
value |
Update statistics level, in format char(3) as follows:
For example, HMN means:
|
duration |
Duration of update statistics in seconds |
Integration
To find out which tables have had their statistics updated by a run of update statistics, you can enter an SQL command like the following using the Informix tool
DBACCESS :Select *
from dbstattinf
where lupdstat like "<date of the last update statistics run>%"
and tabname = "<table name>"
;
For example, for a run of update statistics on the 23rd January 1999 that might possibly have affected table
a014 :Select *
from dbstattinf
where lupdstat like "19990123%"
and tabname = "a014"
;
If a row is returned from this query, this means that table
a014 has had its statistics updated on this date. Examine the row to find out what has happened.If you used
cupdstat in the above query, you can find out if a table has had its statistics checked on this date. For more information, see the section on the check parameter in Update Statistics from the Command Line. During an update statistics run, tables where the threshold is not reached do not have the field lupdstat updated. Instead, the field cupdstat is updated.
See also:
Informix documentation