Skip to content

Instantly share code, notes, and snippets.

@FreekPaans
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FreekPaans/2974b6501195a65ad995 to your computer and use it in GitHub Desktop.
Save FreekPaans/2974b6501195a65ad995 to your computer and use it in GitHub Desktop.
size per index in sql azure
select o1.name table_name,o1.object_id,si.name index_name,dm.reserved_page_count * 8.0/1024 mbsize
from sys.objects o1
join sys.dm_db_partition_stats dm on dm.object_id=o1.object_id
join sys.indexes si on si.object_id=o1.object_id and dm.index_id=si.index_id
where o1.object_id>255
order by mbsize desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment