Joe Webb Blog

Musing and observations about SQL Server, other technogies, and sometimes just life in general

SQL Server 2000: when were the statistics updated?

Although much of the prefacing information about the query optimizer's use of statistics to determine the best way to resolve a query are applicable to SQL Server 2000 and 2005, the script that I included in my last post to determine that last time that the statistics were updated was specific to SQL Server 2005. The sys.indexes view does not exist in the prior version of SQL Server.

I've updated, or rather backdated, the script to work with SQL Server 2000. (It still works under SQL Server 2005).

SELECT
o.name AS Table_Name
,i.name AS Index_Name
,STATS_DATE(o.id,i.indid) AS Date_Updated
FROM
sysobjects o JOIN
sysindexes i ON i.id = o.id
WHERE
xtype = 'U' AND
i.name IS NOT NULL
ORDER BY
o.name ASC
,i.name ASC

Enjoy!

Joe

kick it on DotNetKicks.com

Legacy Comments


Srinivas DOnavalli
2009-03-28
re: SQL Server 2000: when were the statistics updated?
Thanks Very much Joe. It was very use full to me.

hari
2009-06-01
re: SQL Server 2000: when were the statistics updated?
Thanks very much....

raghav
2010-06-04
re: SQL Server 2000: when were the statistics updated?
Thanks ... very usefull

snow boots for women
2010-10-20
re: SQL Server 2000: when were the statistics updated?
the script that I included in my last post to determine that last time that the statistics were updated was specific to SQL Server 2005. The sys.indexes view does not exist in the prior version of SQL Server.

snow boots | columbia jackets | mac makeup | the north face outlet

hanly
2010-10-26
re: SQL Server 2000: when were the statistics updated?
This super video converter for mac is developed by Emicsoft Studio, it is currently the best video converter running under Mac os x, comparied by isqunite, Visualhub and other Video Converter for Mac Free vide under simple video editing function embedded, support Even Thought This video converter for mac is a shareware, it's unregistered version have very little limitation only a samll water mark

furry boots
2010-10-26
re: SQL Server 2000: when were the statistics updated?
the script that I included in my last post to determine that last time that the statistics were updated was specific to SQL Server 2005. The sys.indexes view does not exist in the prior version of SQL Server.

MBT shoes clearance| snow boots for women | columbia jackets | mac makeup | the north face outlet

Osmar
2010-12-28
re: SQL Server 2000: when were the statistics updated?
Thanks, you know some installation is working in 2000 and your ascript is very usefull

hynas
2011-02-11
re: SQL Server 2000: when were the statistics updated?
thank you this was very useful script info.

tattoo shirts que viva tattoo machine review

Kirra
2012-05-31
re: SQL Server 2000: when were the statistics updated?
Very Useful

rpgivpgmr
2012-06-21
re: SQL Server 2000: when were the statistics updated?
Thanks very much as well. Very useful and helpful.

Pinakin
2012-08-21
re: SQL Server 2000: when were the statistics updated?
Very very Good Query

chinni
2012-09-05
re: SQL Server 2000: when were the statistics updated?
Thanks much..it helped me much

Sunny
2012-09-18
re: SQL Server 2000: when were the statistics updated?
Thank you useful query :)