Running ANALYZE to Obtain Index Statistics

Index statistics are useful both to the Query Optimizer and to the user. They tell us more about the index and its effectiveness with the particular data on which it is executing. NuoDB will collect index statistics automatically. Therefore, users are normally not required to perform manual steps to update index statistics for permanent tables.

To avoid performance issues, a table which grows above a specified cardinality threshold ceases to have its indexes' statistics collected automatically. This cardinality threshold is configurable with the stats-collection-threshold database option.

To manually maintain statistics on such tables, the user may issue the ANALYZE command on the table or its indexes. To resume automatic statistics collection on such a table, issue ANALYZE TABLE on the table when its cardinality is below this threshold.