SQL Server 更新统计信息
更新表中的所有统计信息
USE [YourDatabaseName];
GO
UPDATE STATISTICS YourDatabaseName;
GO
更新数据库中的所有统计信息
USE [YourDatabaseName];
GO
-- The following example updates the statistics for all tables in the database.
-- 慎用
EXEC sp_updatestats;