-----------------------以下是mysql的 my.ini配置信息----------------------------------------
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.[mysqld]
#skip-grant-tables
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin# These are commonly set, remove the # and set as required.
basedir="D:/mysql5.6/"
datadir="D:/mysql5.6/Data/"
port = 3306
character-set-server=utf8
default-storage-engine=MyISAM
max_connections=1500
max_user_connections=100query_cache_size=32m
key_buffer_size=128m
query_cache_type= 1max_allowed_packet=100msymbolic-links=0
#skip-name-resolveinnodb_file_per_table# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M sql_mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION---------------------------ini配置文件结束------------------------------------
服务器 CPU E5-2620 v4 *2  双CPU    内存 32G求教 要怎么修改下ini,达到最佳性能。
不甚感激。

解决方案 »

  1.   

    这个要分应用场景,比如你用的默认 engine是 myisam,这个是表乐,对于大量更新来说,表锁是很恐怖的事
      

  2.   


    如果你用的不是myisam引擎,同时也不建议使用查询缓存,所以可以把这3个注释掉:query_cache_size=32m
    key_buffer_size=128m
    query_cache_type= 1另外,如果你用的是innodb,可以启用:innodb_buffer_pool_size = 22G也就是内存的70%左右,这个是mysql的核心参数,控制内存的使用量。