Update Partition Statistics

The SAP ASE 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 SAP ASE 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:
For example, to update statistics for the smallvalues partition of the titles table created previosuly, enter:
update statistics titles partition smallvalues

See the Reference Manual: Commands.