Skip to content

Instantly share code, notes, and snippets.

@kristinaconley
Created August 6, 2013 21:49
Show Gist options
  • Save kristinaconley/6169032 to your computer and use it in GitHub Desktop.
Save kristinaconley/6169032 to your computer and use it in GitHub Desktop.
SELECT avg_fragmentation_in_percent, index_type_desc, index_id
FROM
sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL , null)
WHERE
OBJECT_NAME(OBJECT_ID)='Incident'
AND OBJECT_SCHEMA_NAME(OBJECT_ID)='dbo'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment