Function of StatsRecs
Each row set contains a COLLECT STATISTICS request and related information for collecting the recommended statistics generated by a DUMP EXPLAIN or INSERT EXPLAIN request specified with a CHECK STATISTICS clause.
StatsRecs Table Definition
The following CREATE TABLE request defines the StatsRecs table:
CREATE SET TABLE StatsRecs ( QueryID INTEGER, StatsID INTEGER, DatabaseName VARCHAR128 CHARACTER SET UNICODE NOT CASESPECIFIC, TableName VARCHAR128 CHARACTER SET UNICODE NOT CASESPECIFIC, FieldID INTEGER, FieldName VARCHAR128 CHARACTER SET UNICODE NOT CASESPECIFIC, Level INTEGER, StatsDDL VARCHAR(2500) CHARACTER SETUNICODE NOT CASESPECIFIC) PRIMARY INDEX (QueryID, StatsID);
Attribute Definitions for StatsRecs
The following table defines the StatsRecs table attributes:
Attribute | Description |
---|---|
QueryID |
|
StatsID |
|
DatabaseName | Name of the containing database for TableName. |
TableName | Name of the table in which FieldName is defined. |
FieldID | Unique identifier for FieldName within TableName. |
FieldName | Name of the column in the statistics recommendation. |
Level | A representation of the confidence the Optimizer has in the usefulness of the statistics recommendations generated for this query-column set combination. The level is determined by factors including the following:
This measure is designed to help you prioritize which statistics you want to collect, particularly in situations where you cannot afford to collect statistics on a long list of multicolumn recommendations or for different combinations of multicolumn recommendations. You can also aggregate levels to rank different recommendations.
|
StatsDDL | The DDL text of the COLLECT STATISTICS statement used to populate this row set of the table. For multicolumn statistics, the text of the DDL statement is stored in the row having the lowest FieldID value. In this case, the content of this column for the other rows is null. |