mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
d74414399d
10.0 files
118 lines
5.4 KiB
Text
118 lines
5.4 KiB
Text
"General cleanup"
|
|
drop table if exists t1;
|
|
update performance_schema.setup_instruments set enabled = 'NO';
|
|
update performance_schema.setup_consumers set enabled = 'NO';
|
|
truncate table performance_schema.file_summary_by_event_name;
|
|
truncate table performance_schema.file_summary_by_instance;
|
|
truncate table performance_schema.socket_summary_by_event_name;
|
|
truncate table performance_schema.socket_summary_by_instance;
|
|
truncate table performance_schema.events_waits_summary_global_by_event_name;
|
|
truncate table performance_schema.events_waits_summary_by_instance;
|
|
truncate table performance_schema.events_waits_summary_by_thread_by_event_name;
|
|
update performance_schema.setup_consumers set enabled = 'YES';
|
|
update performance_schema.setup_instruments
|
|
set enabled = 'YES', timed = 'YES';
|
|
create table t1 (
|
|
id INT PRIMARY KEY,
|
|
b CHAR(100) DEFAULT 'initial value')
|
|
ENGINE=MyISAM;
|
|
insert into t1 (id) values (1), (2), (3), (4), (5), (6), (7), (8);
|
|
update performance_schema.setup_instruments SET enabled = 'NO';
|
|
update performance_schema.setup_consumers set enabled = 'NO';
|
|
set @dump_all=FALSE;
|
|
"Verifying file aggregate consistency"
|
|
SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ)
|
|
FROM performance_schema.file_summary_by_event_name AS e
|
|
JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME)
|
|
GROUP BY EVENT_NAME
|
|
HAVING (e.COUNT_READ <> SUM(i.COUNT_READ))
|
|
OR @dump_all;
|
|
EVENT_NAME COUNT_READ SUM(i.COUNT_READ)
|
|
SELECT EVENT_NAME, e.COUNT_WRITE, SUM(i.COUNT_WRITE)
|
|
FROM performance_schema.file_summary_by_event_name AS e
|
|
JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME)
|
|
GROUP BY EVENT_NAME
|
|
HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE))
|
|
OR @dump_all;
|
|
EVENT_NAME COUNT_WRITE SUM(i.COUNT_WRITE)
|
|
SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ)
|
|
FROM performance_schema.socket_summary_by_event_name AS e
|
|
JOIN performance_schema.socket_summary_by_instance AS i USING (EVENT_NAME)
|
|
GROUP BY EVENT_NAME
|
|
HAVING (e.COUNT_READ <> SUM(i.COUNT_READ))
|
|
OR @dump_all;
|
|
EVENT_NAME COUNT_READ SUM(i.COUNT_READ)
|
|
SELECT EVENT_NAME, e.COUNT_WRITE, SUM(i.COUNT_WRITE)
|
|
FROM performance_schema.socket_summary_by_event_name AS e
|
|
JOIN performance_schema.socket_summary_by_instance AS i USING (EVENT_NAME)
|
|
GROUP BY EVENT_NAME
|
|
HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE))
|
|
OR @dump_all;
|
|
EVENT_NAME COUNT_WRITE SUM(i.COUNT_WRITE)
|
|
SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_READ, SUM(i.SUM_NUMBER_OF_BYTES_READ)
|
|
FROM performance_schema.file_summary_by_event_name AS e
|
|
JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME)
|
|
GROUP BY EVENT_NAME
|
|
HAVING (e.SUM_NUMBER_OF_BYTES_READ <> SUM(i.SUM_NUMBER_OF_BYTES_READ))
|
|
OR @dump_all;
|
|
EVENT_NAME SUM_NUMBER_OF_BYTES_READ SUM(i.SUM_NUMBER_OF_BYTES_READ)
|
|
SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_WRITE, SUM(i.SUM_NUMBER_OF_BYTES_WRITE)
|
|
FROM performance_schema.file_summary_by_event_name AS e
|
|
JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME)
|
|
GROUP BY EVENT_NAME
|
|
HAVING (e.SUM_NUMBER_OF_BYTES_WRITE <> SUM(i.SUM_NUMBER_OF_BYTES_WRITE))
|
|
OR @dump_all;
|
|
EVENT_NAME SUM_NUMBER_OF_BYTES_WRITE SUM(i.SUM_NUMBER_OF_BYTES_WRITE)
|
|
"Verifying waits aggregate consistency (instance)"
|
|
SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(i.SUM_TIMER_WAIT)
|
|
FROM performance_schema.events_waits_summary_global_by_event_name AS e
|
|
JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME)
|
|
GROUP BY EVENT_NAME
|
|
HAVING (e.SUM_TIMER_WAIT < SUM(i.SUM_TIMER_WAIT))
|
|
OR @dump_all;
|
|
EVENT_NAME SUM_TIMER_WAIT SUM(i.SUM_TIMER_WAIT)
|
|
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(i.MIN_TIMER_WAIT)
|
|
FROM performance_schema.events_waits_summary_global_by_event_name AS e
|
|
JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME)
|
|
GROUP BY EVENT_NAME
|
|
HAVING (e.MIN_TIMER_WAIT > MIN(i.MIN_TIMER_WAIT))
|
|
AND (MIN(i.MIN_TIMER_WAIT) != 0)
|
|
OR @dump_all;
|
|
EVENT_NAME MIN_TIMER_WAIT MIN(i.MIN_TIMER_WAIT)
|
|
SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(i.MAX_TIMER_WAIT)
|
|
FROM performance_schema.events_waits_summary_global_by_event_name AS e
|
|
JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME)
|
|
GROUP BY EVENT_NAME
|
|
HAVING (e.MAX_TIMER_WAIT < MAX(i.MAX_TIMER_WAIT))
|
|
OR @dump_all;
|
|
EVENT_NAME MAX_TIMER_WAIT MAX(i.MAX_TIMER_WAIT)
|
|
"Verifying waits aggregate consistency (thread)"
|
|
SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(t.SUM_TIMER_WAIT)
|
|
FROM performance_schema.events_waits_summary_global_by_event_name AS e
|
|
JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t
|
|
USING (EVENT_NAME)
|
|
GROUP BY EVENT_NAME
|
|
HAVING (e.SUM_TIMER_WAIT < SUM(t.SUM_TIMER_WAIT))
|
|
OR @dump_all;
|
|
EVENT_NAME SUM_TIMER_WAIT SUM(t.SUM_TIMER_WAIT)
|
|
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(t.MIN_TIMER_WAIT)
|
|
FROM performance_schema.events_waits_summary_global_by_event_name AS e
|
|
JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t
|
|
USING (EVENT_NAME)
|
|
GROUP BY EVENT_NAME
|
|
HAVING (e.MIN_TIMER_WAIT > MIN(t.MIN_TIMER_WAIT))
|
|
AND (MIN(t.MIN_TIMER_WAIT) != 0)
|
|
OR @dump_all;
|
|
EVENT_NAME MIN_TIMER_WAIT MIN(t.MIN_TIMER_WAIT)
|
|
SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(t.MAX_TIMER_WAIT)
|
|
FROM performance_schema.events_waits_summary_global_by_event_name AS e
|
|
JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t
|
|
USING (EVENT_NAME)
|
|
GROUP BY EVENT_NAME
|
|
HAVING (e.MAX_TIMER_WAIT < MAX(t.MAX_TIMER_WAIT))
|
|
OR @dump_all;
|
|
EVENT_NAME MAX_TIMER_WAIT MAX(t.MAX_TIMER_WAIT)
|
|
update performance_schema.setup_consumers set enabled = 'YES';
|
|
update performance_schema.setup_instruments
|
|
set enabled = 'YES', timed = 'YES';
|
|
drop table test.t1;
|