azure - 关于Azure表存储行1MB限制,UTF8代码如何计算?

标签 azure azure-table-storage

让我们先引用:

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

我的问题是:由于所有内容都是 XML 数据,因此对于 1MB 来说,1MB 是什么,1MB ASCII 字符,还是 1MB UTF8 字符,还是其他什么?

示例:

Row1: PartitionKey="A', RowKey="A", Data="A"
Row2: PartitionKey="A', RowKey="A", Data="A"  (this is a UTF8 unicode A)

Row1 和 Row2 大小(长度)相同,还是 Row2.Length=Row1.Length+1

最佳答案

示例中的单列(例如“数据”)仅限于 64 KB 的二进制数据,单行仅限于 1 MB 的数据。字符串以 UTF8 格式编码为二进制,因此限制是字符串最终的字节大小。如果您希望列存储超过 64 KB 的数据,您可以使用 Lokad 提供的 FAT Entity 等技术 ( https://github.com/Lokad/lokad-cloud-storage/blob/master/Source/Lokad.Cloud.Storage/Azure/FatEntity.cs )。该技术非常简单,只需将字符串编码为二进制,然后将二进制拆分为多个列。然后,当您想从表中读取字符串时,只需再次重新连接列并将二进制文件转换回字符串即可。

关于azure - 关于Azure表存储行1MB限制,UTF8代码如何计算?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8950693/

相关文章:

java - 使用 java sdk 的 Azure 服务总线的 Azure 托管标识

c# - 使用 ExecuteSegmented 获取特定数量的分页结果

Azure kubernetes - Nginx Controller 的数量?

python - 使用 python 更快地搜索 Azure blob 名称?

api - 如何限制每个用户或组对 Azure API 管理 (APIM) 中的操作的使用

azure - Azure 门户上的 SQL Server 防火墙规则 UI 似乎已损坏

azure - 将 Azure 表存储迁移到 Cosmos DB

r - 尝试使用 R 连接到 Azure 表时出现 HTTP/1.1 400 错误

javascript - 如何在 Azure 存储表中插入数字列?

node.js - 检查 Azure 表存储中是否存在实体