MySQL Optimization #0

2017-11-28  本文已影响17人  xiaojianxu

Database performance depends on several factors at the database level, such as tables, queries, and configuration settings. These software constructs result in CPU and I/O operations at the hardware level, which you must minimize and make as efficient as possible.

As you work on database performance, you start by learning the high-level rules and guidelines for the software side, and measuring performance using wall-clock time. As you become an expert, you learn more about what happens internally, and start measuring things such as CPU cycles and I/O operations.

Typical users aim to get the best database performance out of their existing software and hardware configurations. Advanced users look for opportunities to improve the MySQL software itself, or develop their own storage engine and hardware appliances to expand the MySQL ecosystem.

Optimizing at the Database Level

The most important factors in making a database application fast is its basic design:

Note:

InnoDB is the default storage engine for new tables. In practice, the advanced InnoDB performance feactures mean that InnoDB tables often outperform the simpler MyISAM tables, especially for a busy database.

Optimizing at the Hardware Level

Any database eventually hits hardware limits as the database becomes more and more busy. A DBA must evaluate whether it is possible to tune the application or reconfigure the server to avoid these bottlenecks, or whether more hardware resources are required. System bottlenecks typically arise from these sources:

上一篇 下一篇

猜你喜欢

热点阅读