It is recommended to rebuild the index when the business is idle;
declare @sql varchar(max)
set @sql=''
select @sql=@sql+'dbcc dbreindex('+name+');' from sys.tables where name not like 'tm%'
print @sql
exec(@sql)
It is recommended to rebuild the index when the business is idle;
declare @sql varchar(max)
set @sql=''
select @sql=@sql+'dbcc dbreindex('+name+');' from sys.tables where name not like 'tm%'
print @sql
exec(@sql)