This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use information_schema; | |
select table_schema, sum(data_length)/1024/1024/1024 as data_gb, sum(index_length)/1024/1024/1024 as index_gb, sum(data_free)/1024/1024/1024 as free_gb from tables group by table_schema; | |
select table_schema, table_name, data_length/1024/1024/1024 as data_gb, index_length/1024/1024/1024 as index_gb, data_free/1024/1024/1024 as free_gb from tables where table_schema not in ('mysql', 'information_schema', 'performance_schema', 'sys') order by data_gb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- (run this all at once) | |
set @binlog_commits_1 = (select variable_value from information_schema.global_status where variable_Name = 'Binlog_commits'); | |
set @binlog_group_commits_1 = (select variable_value from information_schema.global_status where variable_Name = 'Binlog_group_commits'); | |
set @trigger_count_1 = (select variable_value from information_schema.global_status where variable_Name = 'Binlog_group_commit_trigger_count'); | |
set @trigger_timeout_1 = (select variable_value from information_schema.global_status where variable_Name = 'Binlog_group_commit_trigger_timeout'); | |
select sleep(60); | |
set @binlog_commits_2 = (select variable_value from information_schema.global_status where variable_Name = 'Binlog_commits'); | |
set @binlog_group_commits_2 = (select variable_value from information_schema.global_status where variable_Name = 'Binlog_group_commits'); | |
set @trigger_count_2 = (select variable_value from information_schema.global_status where variable_Name = 'Binlog_group_commit_trigger_count'); | |
set @trigger_ |