Updates all statistics information for a given table.
update all statistics table_name
is the name of the table for which statistics are being updated.
Updates index and partition statistics for the salesdetail table:
update all statistics salesdetail
update all statistics updates all statistics information for a given table. Adaptive Server keeps statistics about the distribution of pages within a table, and uses these statistics when considering whether or not to use a parallel scan in query processing on partitioned tables, and which index(es) to use in query processing. The optimization of your queries depends on the accuracy of the stored statistics.
update all statistics updates statistics for all columns in a table and updates partition statistics, if the table is partitioned.
If the table is not partitioned, update all statistics runs only update statistics on the table.
If the table is partitioned and has no indexes, update all statistics runs update partition statistics on the table. If the table is partitioned and has indexes, update all statistics runs update statistics and update partition statistics on the table.
SQL92 – Compliance level: Transact-SQL extension.
update all statistics permission defaults to the table owner and is not transferrable.
Commands – update statistics, update partition statistics