MySQL 文本与 BLOB 与 CLOB [英] MySQL TEXT vs BLOB vs CLOB

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

问题描述

从性能和可用性的角度来看,这些不同的数据类型有什么区别、优点和缺点?

What are the differences, advantages and disadvantages of these different data-types both from a performance standpoint as well as a usability standpoint?

推荐答案

TEXT 是一种基于文本输入的数据类型.另一方面,BLOB 和 CLOB 更适合数据存储(图像等),因为它们具有更大的容量限制(例如 4GB).

TEXT is a data-type for text based input. On the other hand, you have BLOB and CLOB which are more suitable for data storage (images, etc) due to their larger capacity limits (4GB for example).

至于 BLOB 和 CLOB 的区别,我相信 CLOB 有与之相关的字符编码,这意味着它可以很好地适应非常大量的文本.

As for the difference between BLOB and CLOB, I believe CLOB has character encoding associated with it, which implies it can be suited well for very large amounts of text.

BLOB 和 CLOB 数据可能需要很长时间才能检索到,这与检索 TEXT 字段中的数据的速度有关.所以,只使用你需要的东西.

BLOB and CLOB data can take a long time to retrieve, relative to how quick data from a TEXT field can be retrieved. So, use only what you need.

这篇关于MySQL 文本与 BLOB 与 CLOB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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