Data Optimization Methods

Source: Internet
Author: User

Reduces the interactions between applications and databases and the number of executions of the same SQL statement.

Reduce the association between tables, especially for batch data processing, try to query data in a single table and perform logical processing in the memory to reduce the pressure on the database (Java cannot process batch data, try to use C or C ++ for processing, which greatly improves the efficiency)

When the data volume is large, some redundant fields are added to reduce the association of other tables during the design process to improve the query performance.

 

 

Index creation

To improve database performance, indexing is the best and inexpensive. There is no need to add memory, no need to change the program, no need to tune the SQL, as long as the correct 'create Index' is executed, the query speed may be improved by times, which is really tempting. However, there is no free lunch in the world, and the query speed is improved at the cost of the insert, update, and delete speeds. These write operations increase a lot of I/O. The index field must be a field that is frequently used as a query condition.

 

 

Horizontal table Division

For example, if the system interface only provides the monthly query function, you can split the table into 12 by month. You can query only one table for each query.

 

 

Files, images, and other large files are stored in the file system, without the need for Databases

Needless to say, iron !!! Database storage path only

 

 

Instead of frequent read/write operations

The backend script is used for batch processing. In the dark of night, let the machine play.

 

Sorting a subset of a table and creating a view can sometimes accelerate the query. If the query is executed multiple times but more than once, you can find all outstanding customers in one view.

 

 

Data Optimization Methods

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.