MySQL for large table (TENS), how to optimize it?

Source: Internet
Author: User

Question: How do I design or optimize a big table for tens? In addition, there is no other information, the personal feel that this topic is a little fan, have to simply say how to do, for a storage design, must consider the business characteristics, the information collected are as follows:
1. Data capacity: 1-3 years will be about how many data, each piece of data about how many bytes;

2. Data item: Whether there is a large number of paragraphs, the values of those fields are often updated;
3. Data query SQL Condition: The column names of which data items often appear in the Where, GROUP by, and ORDER by clauses are medium;
4. Data Update class SQL Condition: How many columns often appear in the WHERE clause of update or delete;
5.SQL amount of statistical ratio, such as: select:update+delete:insert= how much?

6. What is the magnitude of the total daily execution of large tables and associated SQL?
7. Data in the table: Updated business or query-based business
8. What database physical server are you planning to use, and the database server architecture?
9. What about concurrency?
10. Does the storage engine choose InnoDB or MyISAM?

Generally understand the above 10 questions, as to how to design such a large table, should be clear of everything!

As far as optimization refers to the creation of a good table, can not change the table structure, it is recommended to InnoDB engine, use more memory, reduce the disk IO load, because IO is often the bottleneck of the database server

In addition to the optimization of the index structure to solve performance problems, it is recommended to prioritize the modification of class SQL statements, so that they are faster, have to rely only on the way index organization structure, of course, the premise is that
The index has been created very well, if the main reading, you can consider opening Query_cache,

and adjust some parameter values: sort_buffer_size,read_buffer_size,read_rnd_buffer_size,join_buffer_size

For more information, see:
MySQL database server-side core parameters detailed and recommended configuration
http://www. mysqlops.com/2011/10/26/mysql-variables-one.html

MySQL for large table (TENS), how to optimize it?

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.