Skip to content

Instantly share code, notes, and snippets.

@mikaelweave
Created November 5, 2015 16:50
Show Gist options
  • Save mikaelweave/d35f97d6302e76e249d2 to your computer and use it in GitHub Desktop.
Save mikaelweave/d35f97d6302e76e249d2 to your computer and use it in GitHub Desktop.
This is a collection of SQL scripts that will give you some information about your indexes.
DECLARE @tableName VARCHAR(256);
SET @tableName = 'dbo.ct_pstor';
SELECT name AS Stats,
STATS_DATE(object_id, stats_id) AS LastStatsUpdate
FROM sys.stats
WHERE object_id = OBJECT_ID(@tableName)
and left(name,4)!='_WA_';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment