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;
posted @ 2024-05-24 11:07  Destiny、Yang  阅读(76)  评论(0)    收藏  举报