The Adaptive Server query processor uses statistics about the tables, indexes, partitions, and columns in a query to estimate query costs. The query processor chooses the access method that it determines to be the least expensive. But to do so, it must have accurate statistics.
Some statistics are updated during query processing. Others are updated only when you run the update statistics command or create indexes.
update statistics helps Adaptive Server make the best decisions by creating histograms for each major attribute of the local indexes for a partition, and creating densities for the composite attributes. Use update statistics when a large amount of data in a partitioned table has been added, changed, or deleted.
Permission to issue update statistics and delete statistics defaults to the table owner and is not transferable. update statistics commands let you update statistics for individual data and index partitions. update statistics commands that yield information on partitions include:
update statistics
update table statistics
update all statistics
update index statistics
delete statistics
For example, to update statistics for the smallvalues partition of the titles table created in “Changing an unpartitioned table to a partitioned table”, enter:
update statistics titles partition smallvalues
See the Reference Manual: Commands.