Optimization technology of 1.1 MySQL database
1, MySQL optimization is a comprehensive technology, mainly including
1. Rationalization of table design (3NF compliant)
2. Add appropriate index (index) [Four kinds: normal index, primary key index, unique index unique, full-text index]
3. Sub-table technology (horizontal split, vertical division)
4. Read and Write [write: Update/delete/add] Separation
5. Stored procedures [modular programming, can improve speed]
6. Configuration optimization for MySQL [Configure max concurrency number My.ini, resize cache]
7. mysql Server hardware upgrade
8. Periodically remove unwanted data and defragment regularly (MyISAM)
2, to ensure the efficiency of the database, to do the following four aspects of the work
1. Database design
2. SQL statement Optimization
3. Database parameter Configuration
4. Proper hardware resources and operating system
In addition, the use of appropriate stored procedures can also improve performance.
This sequence also shows the size of the performance impact of these four jobs
1.2 Database table Design
1. To understand three paradigms in a popular way
The first paradigm: 1NF is an atomic constraint on attributes, requiring attributes (columns) to be atomic and non-biodegradable (as long as the relational database satisfies 1NF)
The second paradigm: 2NF is a unique constraint on records, requiring records to have a unique identity, that is, the uniqueness of the entity;
The third paradigm: 3NF is a constraint on field redundancy, which requires no redundancy in the field. There is no redundant database design to do.
04:mysql Performance Optimization One