1 / 7
文档名称:

mysql面试必看.doc

格式:doc   页数:7页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

mysql面试必看.doc

上传人:ffy51856fy 2016/6/24 文件大小:0 KB

下载得到文件列表

mysql面试必看.doc

相关文档

文档介绍

文档介绍:mysql 面试必看 My favorite question during Interview for people to work as mysql DBAs or be involved with MySQL Performance in some way is to ask them what should be tuned in MySQL Server straight after installation, assuming it was installed with default settings. 在面试 MySQL DBA 或者那些打算做 MySQL 性能优化的人时, 我最喜欢问题是: MySQL 服务器按照默认设置安装完之后, 应该做哪些方面的调节呢? I’m surprised how many people fail to provide any reasonable answer to this question, and how many servers are where in wild which are running with default settings. 令我很惊讶的是, 有多少人对这个问题无法给出合理的答案, 又有多少服务器都运行在默认的设置下。 Even though you can tune quite a lot of variables in MySQL Servers only few of them are really important for mon workload. After you get these settings right other changes will monly offer only incremental performance improvements. 尽管你可以调节很多 MySQL 服务器上的变量, 但是在大多数通常的工作负载下, 只有少数几个才真正重要。如果你把这些变量设置正确了, 那么修改其他变量最多只能对系统性能改善有一定提升。 key_buffer_size - Very important if you use MyISAM tables. Set up to 30-40% of available memory if you use MyISAM tables exclusively. Right size depends on amount of indexes, data size and workload - remember MyISAM uses OS cache to cache the data so you need to leave memory for it as well, and data can be much larger than indexes in many cases. Check however if all of key_buffer is used over time - it is not rare to see key_buffer being set to 4G bined size of .MYI files is just 1GB. This would be just a waste.