Execute the UPDATE STATISTICS statement
To collect user-defined statistics, run the UPDATE STATISTICS statement in HIGH or MEDIUM mode.
The syntax of UPDATE STATISTICS is the same for user-defined data types as for built-in data types. However, when UPDATE STATISTICS collects statistics for a user-defined type, it does not automatically determine the minimum and maximum column values (stored in the colmin and colmax columns of the syscolumns system catalog table). Your statcollect() function can explicitly calculate these values if desired.
The statcollect() function executes once for every row that the database server scans during UPDATE STATISTICS. Therefore, a database table must contain more than one row before the database server calls any statcollect() functions.
The number of rows that the database server scans depends on the mode and the confidence level. Executing UPDATE STATISTICS in HIGH mode causes the database server to scan all rows in the table. In MEDIUM mode the database server chooses the number of rows to scan based on the confidence level. The higher the confidence level, the higher the number of rows that the database server scans. For general information about UPDATE STATISTICS, see the HCL Informix® Guide to SQL: Syntax.
UPDATE STATISTICS HIGH FOR TABLE mytable;