SQL Server 2005CPU占用高100%

truncate table


SELECT
object_name(a.object_id) [TableName]
,a.index_id
,name [IndexName]
,avg_fragmentation_in_percent
FROM sys.dm_db_index_physical_stats
(
DB_ID()
, NULL
, NULL, NULL, NULL
) AS a
JOIN sys.indexes AS b
ON a.object_id = b.object_id AND a.index_id = b.index_id;


ALTER INDEX ALL ON [dbo].[vpx_alarm_expression]
REBUILD WITH (
SORT_IN_TEMPDB = ON
,STATISTICS_NORECOMPUTE = ON
,ONLINE = ON);

你可能感兴趣的:(sql server 2005)