存储很长的文本:BLOB或TEXT [英] Store very long text: BLOB or TEXT

查看:187
本文介绍了存储很长的文本:BLOB或TEXT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几条很长的文字(成千上万个字符).将此类文本存储在SQLite中的最佳选择是:TEXT还是BLOB?

I have several texts which are very long (tens of thousands of characters). Which is the best option to store such texts in SQLite: as TEXT or as BLOB ?

推荐答案

在SQLite的数据库文件格式,TEXT和BLOB值完全以相同的方式存储在 中. 唯一的区别是TEXT值的字节被假定为有效的UTF-8.

In SQLite's database file format, TEXT and BLOB values are stored in exactly the same way. The only difference is that the bytes of a TEXT value are assumed to be valid UTF-8.

这篇关于存储很长的文本:BLOB或TEXT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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