update table statistics updates statistics that are stored in systabstats table, such as rowcount, cluster ratios, and so on. update table statistics does not affect column statistics stored in sysstatistics.
update table statistics table_name [ partition data_partition_name ]
is the name of the table you are updating the statistics for.
is the name of the data partition for which you are updating the statistics for. If you do not include this, table statistics for all the the data partitions are updated.
Performs a table statistics update on the smallsales partition:
update table statistics titles partition smallsales
Performs a table statistics update on all of the partitions in the titles table:
update table statistics titles
update table statistics does not update statistics for index partitions. To generate table-level statistics for index partitions, use update statistics.
ANSI SQL – Compliance level: Transact-SQL extension.
update table statistics permission defaults to the table owner and is not transferable. The command can also be executed by the Database Owner, who can impersonate the table owner by running the setuser command.
Commands update all statistics, update index statistics, update statistics
Documentation Performance and Tuning Guide
Copyright © 2005. Sybase Inc. All rights reserved. |