Joe Webb

Musing and observations about SQL Server, other technogies, and sometimes just life in general
posts - 85, comments - 857, trackbacks - 0

My Links

News

This blog has moved!

Click here for the new location.

Follow me on Twitter
Add to Technorati Favorites

Search this Blog
 




Archives

Post Categories

About me

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

Print | posted on Thursday, September 06, 2007 5:35 PM |

Feedback

Gravatar

# re: SQL Server 2000: when were the statistics updated?

Thanks Very much Joe. It was very use full to me.
3/28/2009 10:39 AM | Srinivas DOnavalli
Gravatar

# re: SQL Server 2000: when were the statistics updated?

Thanks very much....
6/1/2009 5:58 AM | hari
Gravatar

# re: SQL Server 2000: when were the statistics updated?

Thanks ... very usefull
6/4/2010 11:21 AM | raghav
Gravatar

# 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
10/20/2010 2:16 AM | snow boots for women
Gravatar

# 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
10/26/2010 1:44 AM | hanly
Gravatar

# 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
10/26/2010 12:29 PM | furry boots
Gravatar

# re: SQL Server 2000: when were the statistics updated?

Thanks, you know some installation is working in 2000 and your ascript is very usefull
12/28/2010 6:15 PM | Osmar
Gravatar

# re: SQL Server 2000: when were the statistics updated?

thank you this was very useful script info.

tattoo shirts que viva tattoo machine review
2/11/2011 11:17 PM | hynas
Gravatar

# re: SQL Server 2000: when were the statistics updated?

Very Useful
5/31/2012 8:04 AM | Kirra
Gravatar

# re: SQL Server 2000: when were the statistics updated?

Thanks very much as well. Very useful and helpful.
6/21/2012 1:35 PM | rpgivpgmr
Gravatar

# re: SQL Server 2000: when were the statistics updated?

Very very Good Query
8/21/2012 2:46 PM | Pinakin
Gravatar

# re: SQL Server 2000: when were the statistics updated?

Thanks much..it helped me much
9/5/2012 2:50 AM | chinni
Gravatar

# re: SQL Server 2000: when were the statistics updated?

Thank you useful query :)
9/18/2012 5:27 AM | Sunny
Comments have been closed on this topic.

Powered by:
Powered By Subtext Powered By ASP.NET