﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Administering / SQL Server 2005  / Statistics / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 20:16:46 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Statistics</title><link>http://www.sqlservercentral.com/Forums/Topic1045109-146-1.aspx</link><description>This query has worked for me in determining statistics that may nee to be updated.  USE YourDB; SELECT	sch.name + '.' + obj.name AS TableName, 	ind.name AS IndexName, 			STATS_DATE(ind.object_id, ind.index_id) AS LastStatsUpdate,	last_user_update, P.row_count, 	DATEDIFF(MI,last_user_update, STATS_DATE(ind.object_id, ind.index_id)) AS TimeDiffMinutesFROM sys.indexes indINNER JOIN sys.objects objON obj.object_id = ind.object_idINNER JOIN sys.schemas sch ON sch.schema_id = obj.schema_id INNER JOIN sys.dm_db_index_usage_stats dmv1ON dmv1.object_id = ind.object_idAND dmv1.index_id = ind.index_idINNER JOIN sys.dm_db_partition_stats PON P.object_id = ind.object_idAND P.index_id = ind.index_idWHERE ind.name IS NOT NULL AND STATS_DATE(ind.object_id, ind.index_id) IS NOT NULL AND dmv1.user_updates &amp;gt; 0AND dmv1.database_id = db_id(N'YourDB')AND dmv1.last_user_update &amp;gt; STATS_DATE(ind.object_id, ind.index_id)AND P.row_count &amp;gt; 0ORDER BY STATS_DATE(ind.object_id, ind.index_id) DESC</description><pubDate>Tue, 11 Jan 2011 08:53:39 GMT</pubDate><dc:creator>Chuck Hottle</dc:creator></item><item><title>RE: Statistics</title><link>http://www.sqlservercentral.com/Forums/Topic1045109-146-1.aspx</link><description>Thanks for the reply Gail.</description><pubDate>Tue, 11 Jan 2011 04:40:44 GMT</pubDate><dc:creator>Vinodh247</dc:creator></item><item><title>RE: Statistics</title><link>http://www.sqlservercentral.com/Forums/Topic1045109-146-1.aspx</link><description>STATS_DATE()It's a function, use it in conjunction with sys.indexes or sys.statistics. Or, if you just want the details for one stats set, DBCC SHOW_STATISTICS will also show last update.Bear in mind that stats that haven't been updated for a while are not necessarily a problem. It's only a problem if there have been lots of data changes in the interim.</description><pubDate>Sun, 09 Jan 2011 22:52:36 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>Statistics</title><link>http://www.sqlservercentral.com/Forums/Topic1045109-146-1.aspx</link><description>Hi All,Good Mrng ! Can anyone tell me what is the common used dmv or sp in query analyzer to find out when was the last statistics updated.</description><pubDate>Sun, 09 Jan 2011 22:04:18 GMT</pubDate><dc:creator>Vinodh247</dc:creator></item></channel></rss>