About Azure Table Storage Row 1MB Limit, How it counts for UTF8 Code?

前端 未结 2 1456
野趣味
野趣味 2021-02-08 08:05

Lets first quote:

Combined size of all of the properties in an entity cannot exceed 1MB. (for a ROW/Entity) from msdn

My Q

相关标签:
2条回答
  • 2021-02-08 08:11

    Single columns such as "Data" in your example are limited to 64 KB of binary data and single rows are limited to 1 MB of data. Strings are encoding into binary in the UTF8 format so the limit is whatever the byte size ends up being for your string. If you want your column to store more than 64 KB of data you can use a technique such as FAT Entity which is provided to you with Lokad (https://github.com/Lokad/lokad-cloud-storage/blob/master/Source/Lokad.Cloud.Storage/Azure/FatEntity.cs). The technique is pretty simple, you just encode your string to binary and then split the binary across multiple columns. Then when you want to read the string from the table, you would just re-join the columns again and convert the binary back to a string.

    0 讨论(0)
  • 2021-02-08 08:15

    Azure table row size calculation is quite involved and includes both the size of the property name and its value plus some overhead.

    http://blogs.msdn.com/b/avkashchauhan/archive/2011/11/30/how-the-size-of-an-entity-is-caclulated-in-windows-azure-table-storage.aspx

    Edit. Removed statement that earlier said that size calculation was slightly inaccurate. It is quite accurate.

    0 讨论(0)
提交回复
热议问题