关于Azure的表的存储1MB行限制,它是如何计算的UTF8 code? [英] About Azure Table Storage Row 1MB Limit, How it counts for UTF8 Code?

查看:162
本文介绍了关于Azure的表的存储1MB行限制,它是如何计算的UTF8 code?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们第一次报价:

综合所有属性的大小在实体不能超过1MB。
  (对于行/实体)从<一个href=\"http://blogs.msdn.com/b/windowsazurestorage/archive/2010/05/10/windows-azure-storage-abstractions-and-their-scalability-targets.aspx\">msdn

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

我的问题是:既然一切都XMLed数据,所以对于1MB,是什么1MB,ASCII字符数的1MB,或UTF8字符数的1MB,还是别的什么

My Questions is: Since everything is XMLed data, so for 1MB, is 1MB of what, 1MB of ASCII Chars, or 1MB of UTF8 Chars, or something else?

样品

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的数据可以使用的技术,如FAT实体,提供给你Lokad(<一个href=\"https://github.com/Lokad/lokad-cloud-storage/blob/master/Source/Lokad.Cloud.Storage/Azure/FatEntity.cs\" rel=\"nofollow\">https://github.com/Lokad/lokad-cloud-storage/blob/master/Source/Lokad.Cloud.Storage/Azure/FatEntity.cs).该技术是pretty简单,您只需连接code您的字符串为二进制,然后在多个列拆分的二进制文件。然后,当你想从表中读取字符串,你只需再重新加入列并转换成二进制回字符串。

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.

这篇关于关于Azure的表的存储1MB行限制,它是如何计算的UTF8 code?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆