SYSCS_UTIL.ENABLE_COLUMN_STATISTICS

The SYSCS_UTIL.ENABLE_COLUMN_STATISTICS system procedure enables collection of statistics on a specific table column in your database.

Syntax

SYSCS_UTIL.ENABLE_COLUMN_STATISTICS(
                       VARCHAR(128) schema,
                       VARCHAR(128) table,
                       VARCHAR(128) columnName)

schemaName

Specifies the schema of the table. Passing a null or non-existent schema name generates an error.

tableName

Specifies the table name of the table. The string must exactly match the case of the table name, and the argument of "Fred" will be passed to SQL as the delimited identifier 'Fred'. Passing a null or non-existent table name generates an error.

columnName

Specifies the name of the column for which you want statistics enabled. Passing a null or non-existent column name generates an error.

Results

This procedure does not return a result.

Usage Notes

Here are some important notes about collecting column statistics:

  • Statistics can only be collected on columns with data types that can be ordered; numeric types, some CHAR types, some BIT types, and date/time types can be ordered.

    You can determine if a data type can be ordered by examining the Comparisons table in the Data Assignments and Comparisons topic: any data type with a Y in any column in that table can be ordered, and thus can have statistics collected on it.

  • Statistics are automatically collected on all columns by default.

SQL Examples

splice> CALL SYSCS_UTIL.ENABLE_COLUMN_STATISTICS('SPLICE', 'Salaries', 'Salary');
Statement executed.

See Also