1, the storage engine choices: If the data tables require a transaction, you should consider using InnoDB, because it is in full compliance with the ACID properties.
If no transaction processing, using the default MyISAM storage engine is wise to
2 points table and warehouses, master and slave.
3, query optimization, to try to avoid full table scans, should first consider the establishment by the column involved in where and order index
4, should be avoided for null fields to determine the value in the where clause, will cause the engine to give up using the index and a full table scan
5, should be avoided in the where clause! = or <> operator, otherwise the engine to give up using the index and a full table scan
6, should be avoided or used in the where clause to join condition, if a field has an index, a field is not indexed, will cause the engine to give up using the index and full table scan
7, Update statements, if only to change the 2 fields, do not Update all fields, otherwise called frequently cause significant the performance of consumption and bring a lot of log
8, for more than the amount of data Da (where hundreds even big) table JOIN, first page again JOIN, or logical reading will be high, poor performance.
Database storage and query optimization principle
Guess you like
Origin www.cnblogs.com/xiongying4/p/12507951.html
Recommended
Ranking