Update Statistics Task
The Update Statistics task updates information about the distribution of key values for one or more statistics groups (collections) in the specified table or indexed view. For more information, see Using Statistics to Improve Query Performance.
By using the Update Statistics task, a package can update statistics for a single database or multiple databases. If the task updates only the statistics in a single database, you can choose the views or the tables whose statistics the task updates. You can configure the update to update all statistics, column statistics only, or index statistics only.
This task encapsulates an UPDATE STATISTICS statement, including the following arguments and clauses:
The table_name or view_name argument.
If the update applies to all statistics, the WITH ALL clause is implied.
If the update applies only to columns, the WITH COLUMN clause is included.
If the update applies only to indexes, the WITH INDEX clause is included.
If the Update Statistics task updates statistics in multiple databases, the task runs multiple UPDATE STATISTICS statements, one for each table or view. All instances of UPDATE STATISTICS use the same clause, but different table_name or view_name values. For more information, see CREATE STATISTICS (Transact-SQL) and UPDATE STATISTICS (Transact-SQL).
The time the task takes to create the Transact-SQL statement that the task runs is proportionate to the number of statistics the task updates. If the task is configured to update statistics in all the tables and views in a database with a large number of indexes, or to update statistics in multiple databases, the task can take a considerable amount of time to generate the Transact-SQL statement.
You can set properties through SSIS Designer. This task is in the Maintenance Plan Tasks section of the Toolbox in SSIS Designer.
For more information about the properties that you can set in SSIS Designer, click the following topic:
For more information about how to set these properties in SSIS Designer, click the following topic: