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

前端 未结 2 1455
野趣味
野趣味 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.

提交回复
热议问题