Based on some of the methods optimized in MYSQL

  • 2020-05-17 06:47:06
  • OfStack

mysql's storage engines myisam and innodb and memory
memory will talk about that in the future
innodb supports things, foreign keys, and row locks. mysql does not
innodb does not support types of fulltext indexes
innodb does not hold a specific number of rows
auto_increment of innodb does not support federated indexes
When innodb deletes a table, 1 row is deleted
--------------------------------------------------------------------------------
Large web site for the operation of the database optimization
1. Separate reading and writing, adopt the main/auxiliary way to disperse the pressure of data and improve the query speed
2. Divide the database horizontally or vertically according to the business characteristics. The simple approach is to reduce the size of the database, the size of the table, to improve the efficiency of database access. Generally speaking, if a database has many tables or one table has more than N records, the service capacity of the database will be significantly reduced. For example, if the mysql data table records reach about 2000W, the performance will be almost unbearable.

The next bottleneck for the database appears
1. Thing operation: the data table designed in the thing will be locked during operation. In this case, there is a delay in accessing the data for these tables
2. Data update: any table in the database will be locked in the process of data update, and there will also be a delay
memcache doesn't do that.

Related articles: