How to optimize the database?

1, optimizing the index, sql statement, analysis of slow query
2, the design table in strict accordance with the design specification data to design the database
3, using the cache, it frequently accessed data and does not require changes in the data into the cache
4, SSD
5, using MYSQL own internal table partitioning technique, it hierarchical data to a different file, it is possible to improve efficiency of reading and writing of the tray
6, the vertical sub-table, it is not a number of frequently used data into a table , the disk save the I / O
. 7, separated from the main reader, taken separated from the master copy read operation and write operation of the database
main principles 8, the database sub-sub-table machine (Laid data becomes large), the data is route
9, select the appropriate table engine optimization of the parameters of the floor
10, were added to the purchase level cache, static and distributed.
11, do not use full-text indexing, search what what
12 with a faster way of punishment, such as storing frequently accessed data NoSql



 

Guess you like

Origin www.cnblogs.com/TddCoding/p/11809235.html