update table statistics

Adaptive Server 15.0.1 adds the ability to run update statistics on a global index.

 update table statistics table_name
[partition data_partition_name]
[index_name [partition index_partition_name]]

Where index_name is the name of index associated with the partition, and index_partition_name is the name of the index partition.

Because running update table statistics incurs the I/O cost of running update statistics, use update statistics to generate both column and table statistics.

You can create, and then drop, a global index to generate global statistics.

When you run update statistics on a single partition, you create global statistics by merging partition statistics. However, these merged global statistics are less accurate than the global statistics created as a side-effect of global index creation. Avoid generating column statistics that overwrite more accurate, earlier versions of column statistics.

Usage