MySQL服务器默认安装之后调节性能的方法

2019-01-03 18:29:47王冬梅

Note: as you can see all of these are global variables. These variables depend on hardware and mix of storage engines, while per session variables are typically workload specific. If you have simple queries there is no reason to increase sort_buffer_size even if you have 64GB of memory to waste. Furthermore doing so may decrease performance.
I normally leave per session variable tuning to second step after I can analyze workload.

注意:就像你看到的上面这些全局表量,它们都是依据硬件配置以及不同的存储引擎而不同,但是会话变量通常是根据不同的负载来设定的。如果你只有一些简单的查询,那么就无需增加 sort_buffer_size 的值了,尽管你有 64GB 的内存。搞不好也许会降低性能。
我通常在分析系统负载后才来设置会话变量。

P.S Note MySQL distribution contains bunch of sample my.cnf files which may be great templates to use. Typically they would already be much better than defaults if you chose correct one.

P.S,MySQL的发行版已经包含了各种 my.cnf 范例文件了,可以作为配置模板使用。通常这比你使用默认设置好的多了。

您可能感兴趣的文章:

CentOS 6.4安装配置LAMP服务器(Apache+PHP5+MySQL)CentOS 6.4安装配置LNMP服务器(Nginx+PHP+MySQL)CentOS 5.4 服务器配置 yum安装Apache+php+MysqlWin2003服务器安装及设置教程 MySQL安全设置图文教程Linux下安装Mysql多实例作为数据备份服务器实现多主到一从多实例的备份centos下安装mysql服务器的方法apache+mysql+php+ssl服务器之完全安装攻略在linux或unix服务器上安装、使用MySQL的注意事项win2008 r2 服务器php+mysql+sqlserver2008运行环境配置(从安装、优化、安全等)在一台服务器上安装两个或多个mysql的实现步骤