Mysql Big Data table update is slow _ MySQL

Source: Internet
Author: User
Mysql Big Data table update is slow to solve bitsCN.com

Mysql Big Data table update is slow to solve

Problem description:

Data tables of tens of millions, update where gid = "adadfadsfasdf", and the returned results are between 70 ms and 1 s.

Analysis:

If the table is large, you may need to retrieve the index first and then the page. However, even if it is a disk operation, each disk operation takes 5 ms and takes about 20 or 30 ms.

So the time must have been spent on io wait.

Use iostat-x-d 1 3 to display the wait time for dozens of milliseconds

So the time is indeed spent on io wait.

Solution:

Reduce io

Increase the mysql memory. it turns out to be 10 GB, and now it is 50 GB.

BitsCN.com

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.