本文介绍了如何在MySQL中压缩列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表,用于存储电子邮件通信.每次有人答复中,还包括了整个踪迹并将其保存到数据库(我之所以需要它,因为应用程序的数量级别更改以纠正可能太高的问题.

I have a table which stores e-mail correspondences. Every time someonereplies, the whole body of the trail is also included and saved intothe database (and I need it that way because the amount of applicationlevel changes to rectify that are going to be too high).

mail文本列的大小为10000.但是,我无法存储更多的文字.我不确定会出现多少种对应关系,我不知道该列的合适数字.

The size of the mail text column is 10000. But, I am having trouble storing text more than that. As I am not sure, how many correspondences can occur, I don't know what a good number will be for the column.

引擎是InnoDB.我可以在MySQL中使用某种列压缩技术来避免增加列的大小吗?

The engine is InnoDB. Can I use some kind of columnar compression technique in MySQL to avoid increasing the size of the column?

然后,如果我继续将varchar列增加到例如20000,该怎么办.该表有大约200万条记录.那会是一件好事吗?

And, what if I go ahead and increase the varchar column to, say, 20000. The table has about 2 million records. Will that be a good thing to do?

推荐答案

您可能正在寻找MySQL COMPRESS() UNCOMPRESS()函数压缩数据以分别进行存储和检索.

You are probably looking for MySQL COMPRESS() and UNCOMPRESS() function to compress data for storage and retrieval respectively.

还要查看 InnoDB压缩用法

这篇关于如何在MySQL中压缩列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 13:53