Script to check the cost of your SQL Azure database objects
What is the cost of storage for your SQL Azure database objects? You can easily check that our with the following script:
SELECT
object_name(t1.object_id) 'Object'
, t2.name 'Index'
, SUM(reserved_page_count) * 8192 'bytes'
FROM sys.dm_db_partition_stats t1
LEFT JOIN sys.indexes t2 ON t1.object_id = t2.object_id AND t1.index_id = t2.index_id
GROUP BY t1.object_id, t2.name
ORDER BY SUM(reserved_page_count) DESC
Since SQL Azure storage currently costs approx $10 per gigabyte and month, you could easily see how your objects affect the price.