Rebuild indexes sql server
-- Re Index EXEC sp_MSforeachtable "dbcc dbreindex('?', '')" -- Update Stats --EXEC sp_updatestats -- or EXEC sp_MSforeachtable "UPDATE STATISTICS ? WITH FULLSCAN"