ESE 列类型为 XmlSerialize 任意对象
将对象 XmlSerialize 到我的 ESE 数据库的最佳 ESE 列类型是什么?
“长二进制”和“长 ASCII 文本”都可以正常工作。
长二进制的原因:绝对确定没有字符对话。
长文本的原因:XML 是文本。
MSDN 似乎说这两种类型仅在排序和搜索时有所不同。显然我不会在该列上创建任何索引;需要可搜索和/或可排序的字段存储在适当类型的单独列中。
是否可以安全地假设任何大小小于 2GB 的 UTF8 文本都可以保存到 ESE“长 ASCII 文本”列值并从中加载?
What's the best ESE column type to XmlSerialize an object to my ESE DB?
Both "long binary" and "long ASCII text" work OK.
Reason for long binary: absolutely sure there's no characters conversation.
Reason for long text: the XML is text.
It seems MSDN says the 2 types only differ when sorting and searching. Obviously I'm not going to create any indices over that column; fields that need to be searchable and/or sortable are stored in separate columns of appropriate types.
Is it safe to assume any UTF8 text, less then 2GB in size, can be saved to and loaded from the ESE "long ASCII text" column value?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您可以将最多 2GB 的 UTF8 文本数据放入任何长文本/二进制列中。长二进制和长文本之间的唯一区别是在列上创建索引时数据标准化的方式。除此之外,ESE 只是将提供的字节存储在列中,而不进行转换。 ESE 只能索引 ASCII 或 UTF16 数据,应用程序有责任确保数据采用正确的格式,因此将数据放入长二进制列中似乎更正确。由于您没有创建索引,因此实际上不会有任何区别。
如果您在 Windows 7 或 Windows Server 2008 R2 上运行,则应该研究列压缩。对于 XML 数据,只需打开压缩即可显着节省成本。
Yes you can put up to 2GB of data of UTF8 text into any long text/binary column. The only difference between long binary and long text is the way that the data is normalized when creating an index over the column. Other than that ESE simply stores the provided bytes in the column with no conversion. ESE can only index ASCII or UTF16 data and it is the application's responsibility to make sure the data is in the correct format so it would seem to be more correct to put the data into a long binary column. As you aren't creating an index there won't actually be any difference.
If you are running on Windows 7 or Windows Server 2008 R2 you should investigate column compresion. For XML data you might get significant savings simply by turning compression on.