ITPub博客

首页 > 数据库 > MySQL > 参数汇总

参数汇总

原创 MySQL 作者:甲骨文技术支持 时间:2018-10-05 12:29:42 0 删除 编辑

5.7默认


innodb_read_io_threads=4

innodb_write_io_threads=4

innodb_change_buffer_max_size=25

innodb_thread_concurrency=0(不限制)


innodb_buffer_pool_load_at_startup=on              --要设置为on

innodb_buffer_pool_dump_at_shutdown=on       --要设置为On


innodb_old_blocks_pct --默认37

innodb_old_blocks_time--默认1000

lower_case_table_names=0(区分大小写)

explicit_defaults_for_timestamp=on

root@localhost 10:21:  [(none)]> show global status like '%innodb_log_wait%';

+------------------+-------+

| Variable_name    | Value |

+------------------+-------+

| Innodb_log_waits | 0     |

+------------------+-------+

1 row in set (0.00 sec)

root@localhost 11:03:  [(none)]> show global status like '%binlog_cache%';

+-----------------------+-----------+

| Variable_name         | Value     |

+-----------------------+-----------+

| Binlog_cache_disk_use | 79020     |

| Binlog_cache_use      | 112372305 |

+-----------------------+-----------+

统计每个库大小:

select table_schema,sum(data_length)/1024/1024/1024 as data_length,sum(index_length)/1024/1024/1024 as index_length,sum(data_length+index_length)/1024/1024/1024 as sum_data_index from information_schema.tables where table_schema!='information_schema' and table_schema!='mysql' group by table_schema;

统计每个表大小:

select table_name,data_length,index_length,sum(data_length+index_length)/1024/1024 as total_size from information_schema.tables where table_schema='cus_0042' group by table_name order by total_size desc;


统计所有数据库的大小:


select sum(data_length+index_length)/1024/1024/1024 from information_schema.tables;





来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/20893244/viewspace-2215471/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: sysbench
下一篇: pt-query-digest
请登录后发表评论 登录
全部评论
2009年获得Oracle OCM认证,ITPUB社区OCM联盟成员,熟悉Oracle,mysql,Python,Zabbix等。

注册时间:2016-12-31

  • 博文量
    143
  • 访问量
    570495