MyISAM - 关闭query_cache?

时间:2012-10-12 15:52:46

标签: mysql database

我一直在查看很多my.cnf配置,想知道一个MyISAM数据库,是不是更好的有一个小的query_cache或关闭query_cache而只是有一个大的key_buffer_size?这两者应该如何联系?

这是基于我的服务器配置自动生成的my.cnf文件(8GB / Dedicated Virtual)

 [mysqld]
 # MyISAM #
 key_buffer_size                = 2G

 # SAFETY #
 max_allowed_packet             = 16M
 max_connect_errors             = 1000000

 # CACHES AND LIMITS #
 tmp_table_size                 = 32M
 max_heap_table_size            = 32M
 query_cache_type               = 0
 query_cache_size               = 0
 max_connections                = 500
 thread_cache_size              = 50
 open_files_limit               = 65535
 table_definition_cache         = 1024
 table_open_cache               = 2048

另一个来自人类:

 [mysqld]

 # MyISAM #
 key_buffer_size                = 4G

 # SAFETY #
 max_allowed_packet             = 1M

 # CACHES AND LIMITS #
 tmp_table_size                 = 64M
 max_heap_table_size            = 64M
 query_cache_type               = 1
 query_cache_size               = 128M
 max_connections                = 500
 thread_cache_size              = 256
 table_open_cache               = 1024

0 个答案:

没有答案