引數彙總

甲骨文技術支援發表於2018-10-05

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部落格 ” ,連結:http://blog.itpub.net/20893244/viewspace-2215471/,如需轉載,請註明出處,否則將追究法律責任。

相關文章