mysql中经常出现历史表,这些表不会进行修改数据的操作,只有读操作。那么我们可以对其进行压缩处理,缩减磁盘空间。Innodb表和MyISAM表的压缩指令不一样。下面分别来讨论:

一、InnoDB表

参考文章:http://blog.csdn.net/linghaowoneng/article/details/51491800

简而言之就一下几点:

1、确保开启参数innodb_file_per_table=1;以及设置innodb_file_format=Barracuda。

2、更改表属性:

alter  table table_name ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;

3、压缩前后对比图

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAmEAAAENCAMAAABw9ULFAAAAAXNSR0IArs4c6QAAAPNQTFRF////+61a/7FcAVqv7/f77e3tAAAA+/v74+/5u9XBh9H7idX/Wa37rvr7//+xLonVLofRsf//WwBb0Ycu1Yku+/ut3d3dXbH/AgAuPDk+r1suFC2I///V+/vR+tCHhC0AqFkAAAZb6/XQSVuv/9WJu6Fqhi4uiC5b0Pv70IdbclRRfr77sVwAjtXB1f//k3ZIS4KcKoLQMAYA46VaWgoA5vGsne/5WYfTd7HBu9WNWAAuXjdxuc+ku4IuZJnBP2CFU6X55MKPXAAuiIyrhofTp4V4UgBabGyJ/c+7p1lI0JiTci9XLQBbXVoAr9P9nVZaMYHOajWBKgAAGTFJREFUeNrtXQtb1MgSHRxvRmAQWFDAB/IQV2AQeYpXAVmXK4ur/v9/c7se3amQMCSTBCZ4zqdNqOnUdFWfVPdEM6fVarWePsyFFgAMhuoZ9ng/clieHrxP+tU8PoHfhWEAAIYBYBgAhgEAGAaAYcC9Z9gjACiFamrYKABcAzAMAMMAMAx5BMAwAAwDwDAwDADDgKYzbG9hzrUHbxYWxsAwoHKGrfxzujFHPz483Ps0kcGw7U9byXfYPh14cNsLC+7ktYWFI/fLx6+jfPw+vOwtRw3MO4394/cFGryL8sTH6n7K8YmPVY5z+4y9GZ+jIU/pNv+I7WhlnGGWTkY/bywsuJnXV3kkA9ewlX8cw84cu/ggxbDPG1tFMv1rK/uYk3LqvB19/H70kcf+np2vnW6F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bjB9q1mvctb2/u0M1KPzTexaeTN2NzrfDyZb+dXlhpNhX3VyFrxSn41VciB2q6h9E8ibVQoXnzZzg6lxy3ikDTrR4dyadL6ZYbFKboUMy6HzTYKLzdYwVYaxJrfXzI5jlRyI3Spq3+h0di6pFB5UUcvpjOp4uNWRqzZ5Wc99GLa42+W/d6LzTTVsv9HLpOh5e7FZ0cxOxErzJ3ajqH0D2FtSKTxmWEmtZOGTa3XkZjNUlwrzniPFj+7d6Hy/oOegm70RYz1v0eT2mtk2VsqB2K2i9g2VRhS+E0rhVTFMFiZu2X+rFa+Stel8u93+H4d3pfNddi0eBnhNbq+ZbWLlHIjdKmr3h1X49jmrZpWU8Wjb8lXC14radL4TSt9mT3gLOt+02W83ml1Wk3vW7jk5VsmB2GeLzFZQ+PY5ixlWRo1bxiNt+vNHTTrf9GPnznS+e9HzZms4q553UPueTMSqOSh8t8IrfIcdL/ssr8Yt45FW/IvaN3S+gWbe04fONzDUDAMAMAwAwwAwDADAMAAMA+49w/DMMlDbM9//Bw0Jn4JO2s5JAAAAAElFTkSuQmCC" alt="" />压缩前

压缩后

查询效率基本没有变化。这里没有保存前后的图片

二、MyISAM表压缩

MyISAM的压缩用到的是myisampack指令。

数据文件大小为336M,索引大小为137M。开始压缩

能够发现数据文件和索引文件都表小了。

压缩后需要检查表

注意:压缩表之后InnoDB仍可以进行插入操作,但是有一定风险;MyISAM不可以插入,会报错。所以建议压缩有都不进行插入操作

mysql 表压缩的更多相关文章

  1. MySQL InnoDB表压缩

    MySQL InnoDB表压缩 文件大小减小(可达50%以上) ==> 查询速度变快(count * 约减少20%以上时间) 如何设置mysql innodb 表的压缩: 第一,mysql的版本 ...

  2. 当mysql表从压缩表变成普通表会发生什么

    前言 本文章做了把mysql表从压缩表过渡到普通表的实验过程,看看压缩表变成普通表会发生什么?本文针对mysql5.7和mysql8分别进行了实验. 1.什么是表压缩 在介绍压缩表变成普通表前,首先给 ...

  3. Mysql表的七种引擎类型,InnoDB和MyISAM引擎对比区别总结

    InnoDB和MyISAM区别总结 我用MySQL的时候用的是Navicat for MySQL(Navicat for mysql v9.0.15注册码生成器)操作库.表操作的,默认的表就是Inno ...

  4. mysql的压缩特性-需求

    需求:最近有个插入量比较大的应用需要上,每天的插入量在1亿左右,同时会有较少的查询,表的单行长度在0.5k,就数据而言每天有近50G数据,由于每天写一张新表,保留30天的数据,一个月下来也要1.5T, ...

  5. MySQL表按月切割

    按月份切割MySQL表数据: 千万级别的数据量也可在毫秒内完成切割操作 注:数据无价请提前自行备份 #!/bin/bash USERNAME=MySQL_user PASSWORD=MySQL_pwd ...

  6. MySQL表最大能达到多少?

    MySQL 3.22限制的表大小为4GB.由于在MySQL 3.23中使用了MyISAM存储引擎,最大表尺寸增加到了65536TB(2567– 1字节).由于允许的表尺寸更大,MySQL数据库的最大有 ...

  7. python 多线程删除MySQL表

    一.需求分析 在<python 统计MySQL表信息>这篇博客中,链接如下: https://www.cnblogs.com/xiao987334176/p/9901692.html 已经 ...

  8. java面试题之----mysql表优化方案

    本文转载自segmentfault,原文链接:https://segmentfault.com/a/1190000006158186. 当MySQL单表记录数过大时,增删改查性能都会急剧下降,可以参考 ...

  9. mysql表数据压缩

    记得一次面试中,面试官问我是否知道表的压缩,这个时候我才知道mysql有个表压缩这么个功能,今天试用下看看表的压缩率怎么样. 这里分两个部分说明,第一部分:官方文档说明:第二部分:具体实例测试. [第 ...

随机推荐

  1. Windows Server 2008 修改系统的SID

    故事背景:用VMware搭建了几个操作系统相同的虚拟机.安装成功一台后,直接拷贝已经生成的VMDK文件来构建其它的虚拟机. 一般情况下,如果复制的各个虚拟机只是单独使用,并且这些虚拟机不加入到域(Ac ...

  2. mycat 新增分片和字符集

    执行 select * from travelrecord ,分析Debug日志,说明整个执行逻辑,包括连接获取,连接同步信息,数据合并,数据返回,连接释放 新增一个分片表 T_VOTE (ID,PR ...

  3. java--构造器与static

    原本无显示编码构造器,则有一个默认的隐式(隐藏的无参构造器),但是,当显示指定了构造器,则这个默认隐式的构造器将不存在,比如此时无法new无参的构造器(除非显示地编写声明无参的构造函数). 如果子类构 ...

  4. 深入理解Java虚拟机—JVM内存结构

    1.概述 jvm内存分为线程共享区和线程独占区,线程独占区主要包括虚拟机栈.本地方法栈.程序计数器:线程共享区包括堆和方法区 2.线程独占区 虚拟机栈 虚拟机栈描述的是java方法执行的动态内存模型, ...

  5. Java中Exception的种类

    通常来讲,Java中的异常会被分为三种: Error: 这种异常被设计成不被捕获,因为这种异常产生于JVM自身. Runtime Exception: 运行时异常往往与环境有关,编译时无法检查,并且可 ...

  6. Codeforces #528 Div2 F (1087F) Rock-Paper-Scissors Champion 树状数组+set

    题意:n个人站成一排,初始时刻每个人手中都有一个图案,可能是石头,剪刀,布3个中的1种,之后会随机选取相邻的两个人玩石头剪刀布的游戏,输的人会离开(如果两个人图案相同,则随机选择一个人离开).执行(n ...

  7. 电脑安装unity3d有C盘逐渐爆满问题解决方案

    打开unity3d软件,Edit - Preference - GI Cache选中 Custom Cache Location,切换到别的盘,然后点击 Clean Cache清空一次,再查看C盘,存 ...

  8. tee 可以看见输出并将其写入到一个文件中

    如下使用tee命令在屏幕上看见输出并同样写入到日志文件my.log中:   [root@localhost home]# top  |tee my.log   tee可以保证你同时在屏幕上看到top的 ...

  9. VMware内部错误解决办法

    虚拟机内部错误,不要担心不是致命错误,往往是由于你的配置被禁用了或者VMware运行权限不够导致 检查你的VMware虚拟网卡是否被禁用 检查你的VMware的运行权限,直接管理员运行就够够的了

  10. Python沙盒环境配置

    一.简介 本文介绍配置python沙盒环境的方法步骤. 二.安装步骤 1.安装pyenv http://www.cnblogs.com/274914765qq/p/4948530.html 2.安装v ...