Skip to content

Instantly share code, notes, and snippets.

@Charmatzis
Created April 16, 2018 04:35
Show Gist options
  • Save Charmatzis/e81fa9c705b0fe91e1475072e05b9c24 to your computer and use it in GitHub Desktop.
Save Charmatzis/e81fa9c705b0fe91e1475072e05b9c24 to your computer and use it in GitHub Desktop.
Get index_physical_stats from table in SQL Server
select index_id
, index_type_desc
, index_depth
, index_level
, page_count
, record_count
from sys.dm_db_index_physical_stats (DB_ID(),
OBJECT_ID('Table_Name'), DEFAULT, DEFAULT, 'DETAILED')
go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment