Database Optimization

 

1) optimization paradigm: such as eliminating redundancy (to save space ..)

2) Anti-Paradigm optimization: such as adding an appropriate redundancy (decrease join)

3) Split Table: partition separating the data on the physical, data of different partitions can develop stored in a data file are on different disks inside. In this way, when a query on this table, only need to be scanned in the partition table, rather than a full table scan, significantly reduced the query time, the other in a different disk partition table will also transfer this data dispersed in different disk I / O, a partition may be carefully set data transmission to the disk I / O competition uniformly dispersed. A large amount of data can be taken from time to time table for this method. Automatic monthly table partitions can be built.
4) In fact, the split was divided into vertical and horizontal split Split: Case: simple shopping system involves temporarily located as follows: 1. Product table (the amount of data 10w, stable) 2. Orders table (the amount of data 200w, and there is growing trend ) 3. a user table (data amount 100w, and there is growing trend) to mysql horizontal resolution and vertical resolution, mysql can tolerate an order of magnitude over a million to ten million static data can be an example on the 

Vertical Split: to solve the problem: IO competition between the table and the table does not solve the problem: single psig embodiment the amount of data in the growth: the product table and a user table into a single table server on an order placed on a server 

Split level:  to solve the problem: the amount of data in a single table pressure increase does not appear to solve the problem: io contention between the table and the table


Program: User Table has been completed and completed by the split by gender split into male and female users user table table table as completed orders and order backlog of products put on the table unfilled orders a server has completed the order form box Male put on a server table female table put on a server (woman loves shopping haha)

Guess you like

Origin www.cnblogs.com/sea-stream/p/11298401.html