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.
相关文章