| 1 |
# restart |
| 2 |
drop table if exists test.marker; |
| 3 |
create table test.marker(a int); |
| 4 |
update performance_schema.setup_consumers set enabled='NO'; |
| 5 |
update performance_schema.setup_instruments set enabled='NO'; |
| 6 |
update performance_schema.setup_instruments set enabled='YES' |
| 7 |
where name like "wait/io/table/%"; |
| 8 |
truncate table performance_schema.events_waits_history_long; |
| 9 |
flush global status; |
| 10 |
flush tables; |
| 11 |
# We are forced to suppress here the server response. |
| 12 |
optimize table mysql.user; |
| 13 |
optimize table mysql.db; |
| 14 |
optimize table mysql.proxies_priv; |
| 15 |
optimize table mysql.roles_mapping; |
| 16 |
optimize table mysql.tables_priv; |
| 17 |
optimize table mysql.procs_priv; |
| 18 |
optimize table mysql.servers; |
| 19 |
optimize table mysql.roles_mapping; |
| 20 |
update performance_schema.setup_consumers set enabled='YES'; |
| 21 |
update performance_schema.setup_objects set enabled='YES' |
| 22 |
where object_type='TABLE' and object_schema= 'mysql'; |
| 23 |
flush privileges; |
| 24 |
insert into test.marker set a = 1; |
| 25 |
insert into test.marker set a = 1; |
| 26 |
insert into test.marker set a = 1; |
| 27 |
show global variables like "performance_schema%"; |
| 28 |
Variable_name Value |
| 29 |
performance_schema ON |
| 30 |
performance_schema_accounts_size 100 |
| 31 |
performance_schema_digests_size 200 |
| 32 |
performance_schema_events_stages_history_long_size 1000 |
| 33 |
performance_schema_events_stages_history_size 10 |
| 34 |
performance_schema_events_statements_history_long_size 1000 |
| 35 |
performance_schema_events_statements_history_size 10 |
| 36 |
performance_schema_events_transactions_history_long_size 1000 |
| 37 |
performance_schema_events_transactions_history_size 10 |
| 38 |
performance_schema_events_waits_history_long_size 10000 |
| 39 |
performance_schema_events_waits_history_size 10 |
| 40 |
performance_schema_hosts_size 100 |
| 41 |
performance_schema_max_cond_classes 90 |
| 42 |
performance_schema_max_cond_instances 1500 |
| 43 |
performance_schema_max_digest_length 1024 |
| 44 |
performance_schema_max_file_classes 80 |
| 45 |
performance_schema_max_file_handles 32768 |
| 46 |
performance_schema_max_file_instances 10000 |
| 47 |
performance_schema_max_index_stat 5000 |
| 48 |
performance_schema_max_memory_classes 320 |
| 49 |
performance_schema_max_metadata_locks 10000 |
| 50 |
performance_schema_max_mutex_classes 210 |
| 51 |
performance_schema_max_mutex_instances 5000 |
| 52 |
performance_schema_max_prepared_statements_instances 100 |
| 53 |
performance_schema_max_program_instances 5000 |
| 54 |
performance_schema_max_rwlock_classes 50 |
| 55 |
performance_schema_max_rwlock_instances 5000 |
| 56 |
performance_schema_max_socket_classes 10 |
| 57 |
performance_schema_max_socket_instances 1000 |
| 58 |
performance_schema_max_sql_text_length 1024 |
| 59 |
performance_schema_max_stage_classes 160 |
| 60 |
performance_schema_max_statement_classes 223 |
| 61 |
performance_schema_max_statement_stack 10 |
| 62 |
performance_schema_max_table_handles 1000 |
| 63 |
performance_schema_max_table_instances 500 |
| 64 |
performance_schema_max_table_lock_stat 500 |
| 65 |
performance_schema_max_thread_classes 50 |
| 66 |
performance_schema_max_thread_instances 400 |
| 67 |
performance_schema_session_connect_attrs_size 2048 |
| 68 |
performance_schema_setup_actors_size 100 |
| 69 |
performance_schema_setup_objects_size 100 |
| 70 |
performance_schema_users_size 100 |
| 71 |
show global status like "performance_schema%"; |
| 72 |
Variable_name Value |
| 73 |
Performance_schema_accounts_lost 0 |
| 74 |
Performance_schema_cond_classes_lost 0 |
| 75 |
Performance_schema_cond_instances_lost 0 |
| 76 |
Performance_schema_digest_lost 0 |
| 77 |
Performance_schema_file_classes_lost 0 |
| 78 |
Performance_schema_file_handles_lost 0 |
| 79 |
Performance_schema_file_instances_lost 0 |
| 80 |
Performance_schema_hosts_lost 0 |
| 81 |
Performance_schema_index_stat_lost 0 |
| 82 |
Performance_schema_locker_lost 0 |
| 83 |
Performance_schema_memory_classes_lost 0 |
| 84 |
Performance_schema_metadata_lock_lost 0 |
| 85 |
Performance_schema_mutex_classes_lost 0 |
| 86 |
Performance_schema_mutex_instances_lost 0 |
| 87 |
Performance_schema_nested_statement_lost 0 |
| 88 |
Performance_schema_prepared_statements_lost 0 |
| 89 |
Performance_schema_program_lost 0 |
| 90 |
Performance_schema_rwlock_classes_lost 0 |
| 91 |
Performance_schema_rwlock_instances_lost 0 |
| 92 |
Performance_schema_session_connect_attrs_lost 0 |
| 93 |
Performance_schema_socket_classes_lost 0 |
| 94 |
Performance_schema_socket_instances_lost 0 |
| 95 |
Performance_schema_stage_classes_lost 0 |
| 96 |
Performance_schema_statement_classes_lost 0 |
| 97 |
Performance_schema_table_handles_lost 0 |
| 98 |
Performance_schema_table_instances_lost 0 |
| 99 |
Performance_schema_table_lock_stat_lost 0 |
| 100 |
Performance_schema_thread_classes_lost 0 |
| 101 |
Performance_schema_thread_instances_lost 0 |
| 102 |
Performance_schema_users_lost 0 |
| 103 |
update performance_schema.setup_consumers set enabled='NO'; |
| 104 |
select event_name, |
| 105 |
left(source, locate(":", source)) as short_source, |
| 106 |
object_type, object_schema, |
| 107 |
if (locate("#sql-", object_name), "#sql-XXXX", object_name) |
| 108 |
as pretty_name, |
| 109 |
operation, number_of_bytes |
| 110 |
from performance_schema.events_waits_history_long |
| 111 |
where event_name like 'wait/io/table/%' |
| 112 |
and object_schema in ("test", "mysql") |
| 113 |
order by thread_id, event_id; |
| 114 |
event_name short_source object_type object_schema pretty_name operation number_of_bytes |
| 115 |
wait/io/table/sql/handler TABLE mysql global_priv fetch 1 |
| 116 |
wait/io/table/sql/handler TABLE mysql global_priv fetch 1 |
| 117 |
wait/io/table/sql/handler TABLE mysql global_priv fetch 1 |
| 118 |
wait/io/table/sql/handler TABLE mysql global_priv fetch 1 |
| 119 |
wait/io/table/sql/handler TABLE mysql global_priv fetch 1 |
| 120 |
wait/io/table/sql/handler TABLE mysql global_priv fetch 1 |
| 121 |
wait/io/table/sql/handler TABLE mysql db fetch 1 |
| 122 |
wait/io/table/sql/handler TABLE mysql proxies_priv fetch 1 |
| 123 |
wait/io/table/sql/handler TABLE mysql proxies_priv fetch 1 |
| 124 |
wait/io/table/sql/handler TABLE mysql proxies_priv fetch 1 |
| 125 |
wait/io/table/sql/handler TABLE mysql proxies_priv fetch 1 |
| 126 |
wait/io/table/sql/handler TABLE mysql proxies_priv fetch 1 |
| 127 |
wait/io/table/sql/handler TABLE mysql roles_mapping fetch 1 |
| 128 |
wait/io/table/sql/handler TABLE mysql tables_priv fetch 1 |
| 129 |
wait/io/table/sql/handler TABLE mysql tables_priv fetch 1 |
| 130 |
wait/io/table/sql/handler TABLE mysql procs_priv fetch 1 |
| 131 |
wait/io/table/sql/handler TABLE mysql servers fetch 1 |
| 132 |
wait/io/table/sql/handler TABLE mysql table_stats fetch 1 |
| 133 |
wait/io/table/sql/handler TABLE mysql column_stats fetch 1 |
| 134 |
wait/io/table/sql/handler TABLE test marker insert 1 |
| 135 |
wait/io/table/sql/handler TABLE test marker insert 1 |
| 136 |
wait/io/table/sql/handler TABLE test marker insert 1 |
| 137 |
show global status like 'performance_schema_%'; |
| 138 |
Variable_name Value |
| 139 |
Performance_schema_accounts_lost 0 |
| 140 |
Performance_schema_cond_classes_lost 0 |
| 141 |
Performance_schema_cond_instances_lost 0 |
| 142 |
Performance_schema_digest_lost 0 |
| 143 |
Performance_schema_file_classes_lost 0 |
| 144 |
Performance_schema_file_handles_lost 0 |
| 145 |
Performance_schema_file_instances_lost 0 |
| 146 |
Performance_schema_hosts_lost 0 |
| 147 |
Performance_schema_index_stat_lost 0 |
| 148 |
Performance_schema_locker_lost 0 |
| 149 |
Performance_schema_memory_classes_lost 0 |
| 150 |
Performance_schema_metadata_lock_lost 0 |
| 151 |
Performance_schema_mutex_classes_lost 0 |
| 152 |
Performance_schema_mutex_instances_lost 0 |
| 153 |
Performance_schema_nested_statement_lost 0 |
| 154 |
Performance_schema_prepared_statements_lost 0 |
| 155 |
Performance_schema_program_lost 0 |
| 156 |
Performance_schema_rwlock_classes_lost 0 |
| 157 |
Performance_schema_rwlock_instances_lost 0 |
| 158 |
Performance_schema_session_connect_attrs_lost 0 |
| 159 |
Performance_schema_socket_classes_lost 0 |
| 160 |
Performance_schema_socket_instances_lost 0 |
| 161 |
Performance_schema_stage_classes_lost 0 |
| 162 |
Performance_schema_statement_classes_lost 0 |
| 163 |
Performance_schema_table_handles_lost 0 |
| 164 |
Performance_schema_table_instances_lost 0 |
| 165 |
Performance_schema_table_lock_stat_lost 0 |
| 166 |
Performance_schema_thread_classes_lost 0 |
| 167 |
Performance_schema_thread_instances_lost 0 |
| 168 |
Performance_schema_users_lost 0 |
| 169 |
truncate performance_schema.events_waits_history_long; |
| 170 |
flush global status; |
| 171 |
update performance_schema.setup_consumers set enabled='NO'; |
| 172 |
truncate performance_schema.events_waits_history_long; |
| 173 |
drop table test.marker; |
| 174 |
flush global status; |
| 175 |
update performance_schema.setup_instruments set enabled='YES'; |
| 176 |
update performance_schema.setup_consumers set enabled='YES'; |
| 177 |
update performance_schema.setup_objects set enabled='NO' |
| 178 |
where object_type='TABLE' and object_schema= 'mysql'; |