Skip to content

Instantly share code, notes, and snippets.

@timgaunt
Last active October 13, 2015 11:47
Show Gist options
  • Save timgaunt/4191239 to your computer and use it in GitHub Desktop.
Save timgaunt/4191239 to your computer and use it in GitHub Desktop.
Get size of tables in SQL Azure
select sum(reserved_page_count) * 8.0 / 1024
from sys.dm_db_partition_stats
GO
SELECT sys.objects.name, sum(reserved_page_count) * 8.0 / 1024
from sys.dm_db_partition_stats, sys.objects
where sys.dm_db_partition_stats.object_id = sys.objects.object_id
group by sys.objects.name
ORDER BY sum(reserved_page_count) DESC
@timgaunt
Copy link
Author

timgaunt commented Dec 2, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment