Update the index statistics for every index on every table sp_MSforeachdb 'use [?]; exec sp_updatestats' Refresh the metadata for every view in the database. Find the number of rows in every table in your database
Update the index statistics for every index on every table sp_MSforeachdb 'use [?]; exec sp_updatestats'