大多数人喜欢是
Maximum MySQL Memory Usage = innodb_buffer_pool_size + key_buffer_size + (read_buffer_size + sort_buffer_size)* max_connections
我觉得更好的计算是
Maximum MySQL Memory Usage = innodb_buffer_pool_size + key_buffer_size + ((read_buffer_size + read_rnd_buffer_size + sort_buffer_size + join_buffer_size)*max_connections)
下面这些变量是那些你需要调整,直到安装的RAM的公式收益率为80%或更少。
sort_buffer_size
read_buffer_size
read_rnd_buffer_size
join_buffer_size
max_connections
原文链接:mysql最大内存使用量,转载请注明来源!