Search this insane blog:

Monday, April 13, 2009

Last time statistics were done?

-- view the date the statistics were last updated:
select 'index Name' = i.[name],
'Statistics Date' = stats_date(i.[object_id], i.index_id)
from sys.objects o
inner join sys.indexes i
on o.name = 'Employee'
and o.[object_id] = i.[object_id]
-- if you need to update all the indexes:


update statistics HumanResources.Employee
with fullscan

No comments:

Post a Comment