本文介绍了myisam_sort_buffer_size与sort_buffer_size的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是具有6GB RAM的服务器上的MySQL.我需要知道myisam_sort_buffer_size和sort_buffer_size有什么区别吗?

I am MySQL on server with 6GB RAM. I need to know what is the difference between myisam_sort_buffer_size and sort_buffer_size?

我为他们设置了以下尺寸:

I have following size set to them:

myisam_sort_buffer_size = 8M

myisam_sort_buffer_size = 8M

sort_buffer_size = 256M

sort_buffer_size = 256M

请还提及这些值是否合适或需要调整?

Please also mention if these values are fine or need adjustments?

谢谢

推荐答案

sort_buffer_size:

MySQL文档:

您的sort_buffer_size值似乎很高.默认值为2M.我建议不要超过此值,因为提高性能会降低性能. 有人建议使用较小的值,例如256kB.要记住的一件事是,这是每个客户端会话,不是全局值.较大的值将快速累加.

Your sort_buffer_size value seems extremely high. The default is 2M. I'd recommend going no larger than that since there is a performance penalty for going higher. Some people recommend smaller values such as 256kB. One thing to remember is this is per-client-session, it's not a global value. Large values will add up fast.

myisam_sort_buffer_size:

MySQL文档:

您的myisam_sort_buffer_size看起来不错.除非您要使用ALTER TABLE或REPAIR TABLE等重建索引,否则这将无关紧要.

Your myisam_sort_buffer_size seems fine. This won't be relevant unless you are rebuilding indexes using ALTER TABLE or REPAIR TABLE etc.

这篇关于myisam_sort_buffer_size与sort_buffer_size的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 13:05