Optimization Series | Game Data Sheet split Optimization classic case

Source: Internet
Author: User

1. Purpose
Through the comparison test, the performance comparison between the TABC of a data table is analyzed and the feasibility of the splitting scheme is determined.


2. Methods
Compare and test the two types before and after the split scheme.
At the same time, two types of updates are used for each test:
1. Similar to the original, the update of all fields in the data table is multiple
2. Updates to all fields in the data table are completed once


3. Environment
This test uses online actual data import. TABC table total of 1.32 million records, the full table total 100G.
Regroup all the fields to ensure that the actual row length of each table is no higher than 8KB, split into 3 sub-tables, the size is:
TABC_1.IBD 796M
TABC_2.IBD 10.2G
TABC_3.IBD 8.4G

Then the full table is randomly updated, and each round of testing is done concurrently with the stored procedure in the script, with a maximum of 10 concurrent processes.
Restart the mysqld before each test without additional pressure to ensure a fair environment.


4. Results


Full table Sub-table
Multiple update 02:56:49 00:16:06
One update 00:54:02 00:08:56


5. Conclusion
From the test results, it is obvious that the concurrency update efficiency is much higher than the score table, and if multiple updates to the TBLC table can be merged together, it can be greatly improved.

It is therefore recommended that:
1. Implementation of the same separation programme for other tables similar to the TBLC table;
2. Updating the data table is best done at once, instead of multiple fields, turning one transaction into multiple transactions;


The principle of the table:
1. Detach the text field from the original table;
2. Re-group the separated text fields to ensure that the actual row length of each table is no higher than 8KB;
3. If possible, do not use text, the actual length of less than 255, directly into the varchar;


--------------------------------------Split Line--------------------------------------

http://zhishuedu.comTraining is a professional quality training brand jointly launched by senior MySQL expert Ye Jinlong and Wu Bingxi, with MySQL dba combat optimization and Python devops Development course, which is the most conscientious and The most quality training courses.

This article is from the "Lao Ye teahouse" blog, please be sure to keep this source http://imysql.blog.51cto.com/1540006/1879732

Optimization Series | Game Data Sheet split Optimization classic case

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.