When cardinality statistics go stale

As you saw in When cardinality statistics are automatically updated, cardinality statistics are automatically updated only in limited cases. Normal insert, update, and delete statements do not cause the statistics to be updated. This means that statistics can go stale. Stale statistics can slow your system down, because they worsen the accuracy of the optimizer's estimates of selectivity.

Statistics are likely to be stale if the number of distinct values in an index has changed significantly. This can happen often or rarely, depending on the nature of the column being indexed. You can refresh cardinality statistics by calling the procedure SYSCS_UTIL.SYSCS_UPDATE_STATISTICS. For information about this procedure, see the Derby Reference Manual.

Related concepts
When cardinality statistics are automatically updated