mysql存储过程在迁移到新服务器后花费了太多时间。存储过程花费太多时间返回结果。我的cnf文件如下
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
bind-address = 0.0.0.0
key_buffer_size = 384M
max_allowed_packet = 16M
table_open_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_stack = 192K
thread_cache_size = 38
myisam-recover-options = BACKUP
query_cache_limit = 1M
query_cache_size = 185M
max_binlog_size = 100M
query_cache_size = 185M
tmp_table_size = 66M
thread_cache_size = 38
innodb_log_buffer_size=6M
innodb_buffer_pool_size=557M
innodb_log_file_size=256M
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
有没有办法优化更多。
1条答案
按热度按时间xpszyzbs1#
对my.cnf[mysqld]部分的建议
删除以下内容以允许mysql默认值为您工作,并避免过度提供ram需求。
有好几倍的
删除一个
添加
因为它应该始终与tmp\u table\u size相同
请查看我的个人资料,网络资料的联系信息,包括我的skype id,并与我取得联系,请。