An Application of MySQL to compress tables

Source: Internet
Author: User

An Application of MySQL to compress tables

1. Set server Parameters
Innodb_file_per_table = ON
Innodb_file_format = Barracuda

2. Create or modify table parameters
Alter table sod_song_log_2014_10_12 row_format = compressed key_block_size = 8;

The business system has a lot of log data, which can be processed offline for more than half a year, but cannot be deleted (the boss said it will do Data Mining in the future)
At this time, you can start an instance separately. As a centralized log server, all tables use compressed tables.
In this way, you can use data mining and reduce disk space usage.

Compressing previous log data



After compression,


We can see that the occupied space is reduced from 3.2gb to 1.2G. the effect is very obvious.

This article permanently updates link: http://www.bkjia.com/Linux/2015-06/118363tm

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.