Statistics are automatically created for only the new index.
If there is no existing index that can be used for the new key or constraint,
If the index cardinality statistics for the tables involved in the query are deemed to be out of date, the query compiler will schedule a job that updates them in a separate thread.
Statistics are created automatically for all indexes if the statistics do not already exist.
The thread that updates the statistics in the background during query compilation may affect the performance of the user threads. If this causes problems, you can disable automatic updating of statistics by setting the database property derby.storage.indexStats.auto to false.
To diagnose problems with automatic updating of index statistics, an
application can set the database property
derby.storage.indexStats.log to true. When this property is set, the
thread that updates the statistics will write messages to the
See the
To remove all statistics in case of problems, call the