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