Azure Storage Table size

alexey picture alexey · Nov 30, 2012 · Viewed 8.5k times · Source

Azure billing is based on the size of used space. Now I need to know the details. What is the size of each storage object in my storage (blob container, single table)?

It's easy to write a code that enumerates all blobs and calculates the overall size per container. But what about tables? How can I get the size of a certain table in Azure storage?

Answer

Stopped Contributing picture Stopped Contributing · Nov 30, 2012

If you're not interested in getting a breakup by blob container, you don't have to write the code as far as finding the blob storage size is concerned. This information is available to you via storage analytics (http://msdn.microsoft.com/en-us/library/windowsazure/hh343270.aspx). The table of interest to you would be $MetricsCapacityBlob (http://msdn.microsoft.com/en-us/library/windowsazure/hh343264.aspx).

Coming to tables, unfortunately no such thing is available and you would need to fetch all entities and calculate the size of each entity to find the table size. You may find this blog post useful in calculating the size of an entity: http://blogs.msdn.com/b/avkashchauhan/archive/2011/11/30/how-the-size-of-an-entity-is-caclulated-in-windows-azure-table-storage.aspx.

HTH.