mysql数据压缩存储_压缩文本,然后存储在mysql数据库中

bd96500e110b49cbb3cd949968f18be7.png

I am developing a web application using php and MySQL. I am compressing the text using gzcompress() php function before storing in MySQL database / storing compressed form of text in database. My Question is that is this OK? to store compressed form? Or this method will create trouble or not for me? I am compressing text for saving disk space.

解决方案

I honestly don't see any practical benefits of storing compressed texts. Sure you could probably save some space, but if your text is so big that you get a practical benefit out of compressing it, I think you need to worry more about your server's CPU having to compress / uncompress the humongous text whenever a visitor visits your pages (and not to mention searchable text means you gotta uncompress it to search).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值