Recomputes the selectivity of a specified index. Available in
gpre, DSQL, and
SET STATISTICS INDEX name;
Name of an existing index for which to recompute selectivity
SET STATISTICS enables the selectivity of an index to be recomputed. Index selectivity is a calculation, based on the number of distinct rows in a table, that is made by the InterBase optimizer when a table is accessed. It is cached in memory, where the optimizer can access it to calculate the optimal retrieval plan for a given query. For tables where the number of duplicate values in indexed columns radically increases or decreases, periodically recomputing index selectivity can improve performance.
Only the creator of an index can use
Example: The following embedded SQL statement recomputes the selectivity for an index:
EXEC SQL SET STATISTICS INDEX MINSALX;