MySQL性能调优过程总结

1.show  full processlist;
可用于生产环境现场查看哪些锁存在。
2show innodb status;
用于查看死锁。
3.slow log
用户查看慢查询
4.show status
用户调优my.cnf参数,具体详见
修改参数示例:

set global  key_buffer_size=1073741824;
'key_buffer_size'
set global  table_open_cache=2048;
show variables like 'table_open_cache';
show variables like 'open-files- limit';
set global   query_cache_size=128M;
set global  table_open_cache=1024;
set global  max_connections=00;
max_connections=800
Opened_tables
key_buffer_size

show status like 'key_read%';
SHOW STATUS LIKE 'Qcache%'
show variables like 'innodb_buffer_pool_size';
 innodb_buffer_pool_size
show variables like 'read_buffer_size';
5.案例

Chambon <bernard.chambon@ stripped> wrote:

> Can somebody tell me if 'key_buffer' and 'key_buffer_size' are the same variables ?

Yes. _size is deprecated. 

> Perhaps it is just a question of syntax, I mean, in the my.cnf
>    you write  key_buffer=100M
> or you write  set-variable = key_buffer_size=100M

It's the same. "set-variable" is deprecated, so use the first syntax instead.

> Same question for
>  sort_buffer and sort_buffer_size,
>  thread_cache and thread_cache_size,
>  innodb_buffer_pool and innodb_buffer_pool_size
> etc.

All the same :-)

'key_buffer' 和'key_buffer_size'  是一样的意思
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

流子

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值