none
Size of azure table

    Question

  • Hi,

    Is it possible to get the size of an azure table? How can I do that (and can I do it in C#)?

    thanks!

    Filip

    Thursday, February 4, 2016 8:32 AM

Answers

  • Filip, this will require you to know the number of entities and types of properties in each entity to estimate size yourself. Blob post http://blogs.msdn.com/b/windowsazurestorage/archive/2010/07/09/understanding-windows-azure-storage-billing-bandwidth-transactions-and-capacity.aspx explains how you can do so. Mine
    • Marked as answer by Filip VR Monday, February 8, 2016 4:58 PM
    Saturday, February 6, 2016 4:57 AM
  • You have to calculate it based on the size of the record and number of records...

    http://blogs.msdn.com/b/windowsazurestorage/archive/2010/07/09/understanding-windows-azure-storage-billing-bandwidth-transactions-and-capacity.aspx

    Tables – The following is how to estimate the amount of storage consumed per Table:

    12 bytes + Len(TableName) * 2 bytes

    The following is the breakdown:

    • 12 bytes overhead for each Table, which includes the Last Modified Time and some system metadata.
    • The table name is stored as Unicode so take the number of characters and multiple by 2.

    Entities – The following is how to estimate the amount of storage consumed per entity:

    4 bytes  + Len (PartitionKey + RowKey) * 2 bytes +
    For-Each Property(8 bytes + Len(Property Name) * 2 bytes + Sizeof(.Net Property Type))

    The following is the breakdown:

    • 4 bytes overhead for each entity, which includes the Timestamp, along with some system metadata.
    • The number of characters in the PartitionKey and RowKey values, which are stored as Unicode (times 2 bytes).
    • Then for each property we have an 8 byte overhead, plus the name of the property * 2 bytes, plus the size of the property type as derived from the list below.

    The Sizeof(.Net Property Type) for the different types is:

    • String – # of Characters * 2 bytes + 4 bytes for length of string
    • DateTime – 8 bytes
    • GUID – 16 bytes
    • Double – 8 bytes
    • Int – 4 bytes
    • INT64 – 8 bytes
    • Bool – 1 byte
    • Binary – sizeof(value) in bytes + 4 bytes for length of binary array


    Dan Stolts (ITProGuru)

    Monday, February 8, 2016 7:10 PM

All replies

  • Hi,

    Table storage maximum size has limit by two reasons.

      1. limit for account upper size( total of queue, blob and table)  is  100TB

      2. limit for a table storage entity is 1MB

    Ref: https://azure.microsoft.com/en-in/documentation/articles/storage-table-design-guide/

    Hope this helps.

    Girish Prajwal

    Thursday, February 4, 2016 2:03 PM
    Moderator
  • Hi,

    It doesn't really answers my question, because I want to be notified when my azure table is becoming to big for PowerBI, so I'm looking for a way to get the current table size. How can I do that (and can I do it programmatically)?

    regards,

    Filip

    Friday, February 5, 2016 10:30 AM
  • Filip, this will require you to know the number of entities and types of properties in each entity to estimate size yourself. Blob post http://blogs.msdn.com/b/windowsazurestorage/archive/2010/07/09/understanding-windows-azure-storage-billing-bandwidth-transactions-and-capacity.aspx explains how you can do so. Mine
    • Marked as answer by Filip VR Monday, February 8, 2016 4:58 PM
    Saturday, February 6, 2016 4:57 AM
  • Thanks, that will help me a lot! 

    Regards,

    Filip

    Monday, February 8, 2016 5:00 PM
  • You have to calculate it based on the size of the record and number of records...

    http://blogs.msdn.com/b/windowsazurestorage/archive/2010/07/09/understanding-windows-azure-storage-billing-bandwidth-transactions-and-capacity.aspx

    Tables – The following is how to estimate the amount of storage consumed per Table:

    12 bytes + Len(TableName) * 2 bytes

    The following is the breakdown:

    • 12 bytes overhead for each Table, which includes the Last Modified Time and some system metadata.
    • The table name is stored as Unicode so take the number of characters and multiple by 2.

    Entities – The following is how to estimate the amount of storage consumed per entity:

    4 bytes  + Len (PartitionKey + RowKey) * 2 bytes +
    For-Each Property(8 bytes + Len(Property Name) * 2 bytes + Sizeof(.Net Property Type))

    The following is the breakdown:

    • 4 bytes overhead for each entity, which includes the Timestamp, along with some system metadata.
    • The number of characters in the PartitionKey and RowKey values, which are stored as Unicode (times 2 bytes).
    • Then for each property we have an 8 byte overhead, plus the name of the property * 2 bytes, plus the size of the property type as derived from the list below.

    The Sizeof(.Net Property Type) for the different types is:

    • String – # of Characters * 2 bytes + 4 bytes for length of string
    • DateTime – 8 bytes
    • GUID – 16 bytes
    • Double – 8 bytes
    • Int – 4 bytes
    • INT64 – 8 bytes
    • Bool – 1 byte
    • Binary – sizeof(value) in bytes + 4 bytes for length of binary array


    Dan Stolts (ITProGuru)

    Monday, February 8, 2016 7:10 PM