Provide statistics data for a column
The database server can provide statistics data for the columns of a table. This statistics data describes the distribution of the values within a column. The query optimizer uses this statistics data to determine the best path for an SQL statement. With this information, the optimizer can estimate the effect of a WHERE clause by examining, for each column included in the WHERE clause, the proportionate occurrence of data values contained in the column.
- The UPDATE STATISTICS statement collects statistics data for the columns of a table.
- The dbschema -hd command displays statistics data for columns in a table.
However, the database server can only provide this support for columns with built-in data types. For the database server to support statistics data for a column with a user-defined data type, you must write special UDRs that collect and print the statistics data.
For more information about statistics data and the optimizer, see your Informix® Performance Guide.