8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

10.13.2 使用你自己的基准测试10.13.2 Using Your Own Benchmarks

对你的应用程序和数据库进行基准测试,以找出瓶颈所在。在修复一个瓶颈(或将其替换为“虚拟”模块)后,你可以继续识别下一个瓶颈。即使你的应用程序目前整体性能可以接受,你也至少应该为每个瓶颈制定计划,并决定如果将来确实需要额外性能时如何解决它。Benchmark your application and database to find out where the bottlenecks are. After fixing one bottleneck (or by replacing it with a “dummy” module), you can proceed to identify the next bottleneck. Even if the overall performance for your application currently is acceptable, you should at least make a plan for each bottleneck and decide how to solve it if someday you really need the extra performance.

一个免费的基准测试套件是开源数据库基准测试,可在 http://osdb.sourceforge.net/ 获取。A free benchmark suite is the Open Source Database Benchmark, available at http://osdb.sourceforge.net/.

问题通常只在系统负载非常高时才会出现,这是很常见的。我们有许多客户在生产中使用经过测试的系统时遇到负载问题后联系我们。在大多数情况下,性能问题最终被发现是由于基本数据库设计的问题(例如,在高负载下表扫描表现不佳)或者操作系统或库的问题。大多数时候,如果系统尚未投入生产,这些问题会更容易解决。It is very common for a problem to occur only when the system is very heavily loaded. We have had many customers who contact us when they have a (tested) system in production and have encountered load problems. In most cases, performance problems turn out to be due to issues of basic database design (for example, table scans are not good under high load) or problems with the operating system or libraries. Most of the time, these problems would be much easier to fix if the systems were not already in production.

为了避免此类问题,请在最坏的负载情况下对整个应用程序进行基准测试:To avoid problems like this, benchmark your whole application under the worst possible load:

这些程序或软件包可能会使系统不堪重负,因此务必仅在开发系统上使用它们。These programs or packages can bring a system to its knees, so be sure to use them only on your development systems.