mariadb/mysql-test/suite/percona/percona_query_response_time-stored.result

544 lines
15 KiB
Text

CREATE TABLE t(a INT);
CREATE PROCEDURE test_f(t DECIMAL(3,2))
BEGIN
SET SESSION query_exec_time=t;
INSERT INTO t VALUES(1);
SET SESSION query_exec_time=0.1;
DELETE FROM t;
END^
SET SESSION query_exec_time=0.1;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1;
Warnings:
Warning 1292 Truncated incorrect query_response_time_range_base value: '1'
FLUSH QUERY_RESPONSE_TIME;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
CALL test_f(0.31);
CALL test_f(0.32);
CALL test_f(0.33);
CALL test_f(0.34);
CALL test_f(0.35);
CALL test_f(0.36);
CALL test_f(0.37);
CALL test_f(0.38);
CALL test_f(0.39);
CALL test_f(0.4);
CALL test_f(1.1);
CALL test_f(1.2);
CALL test_f(1.3);
CALL test_f(1.5);
CALL test_f(1.4);
CALL test_f(0.5);
CALL test_f(2.1);
CALL test_f(2.3);
CALL test_f(2.5);
CALL test_f(3.1);
CALL test_f(4.1);
CALL test_f(5.1);
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 2
SHOW QUERY_RESPONSE_TIME;
0.000001 45 0.000000
0.000003 0 0.000000
0.000007 0 0.000000
0.000015 0 0.000000
0.000030 0 0.000000
0.000061 0 0.000000
0.000122 0 0.000000
0.000244 0 0.000000
0.000488 0 0.000000
0.000976 0 0.000000
0.001953 0 0.000000
0.003906 0 0.000000
0.007812 0 0.000000
0.015625 0 0.000000
0.031250 0 0.000000
0.062500 0 0.000000
0.125000 44 4.400000
0.250000 0 0.000000
0.500000 10 3.550000
1.000000 1 0.500000
2.000000 5 6.500000
4.000000 4 10.000000
8.000000 2 9.199999
16.000000 0 0.000000
32.000000 0 0.000000
64.000000 0 0.000000
128.000000 0 0.000000
256.000000 0 0.000000
512.000000 0 0.000000
1024.000000 0 0.000000
2048.000000 0 0.000000
4096.000000 0 0.000000
8192.000000 0 0.000000
16384.000000 0 0.000000
32768.000000 0 0.000000
65536.000000 0 0.000000
131072.000000 0 0.000000
262144.000000 0 0.000000
524288.000000 0 0.000000
1048576.000000 0 0.000000
2097152.000000 0 0.000000
4194304.000000 0 0.000000
8388608.000000 0 0.000000
TOO LONG 0 TOO LONG
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
time count total
0.000001 45 0.000000
0.000003 0 0.000000
0.000007 0 0.000000
0.000015 0 0.000000
0.000030 0 0.000000
0.000061 0 0.000000
0.000122 0 0.000000
0.000244 0 0.000000
0.000488 0 0.000000
0.000976 0 0.000000
0.001953 0 0.000000
0.003906 0 0.000000
0.007812 0 0.000000
0.015625 0 0.000000
0.031250 0 0.000000
0.062500 0 0.000000
0.125000 44 4.400000
0.250000 0 0.000000
0.500000 10 3.550000
1.000000 1 0.500000
2.000000 5 6.500000
4.000000 4 10.000000
8.000000 2 9.199999
16.000000 0 0.000000
32.000000 0 0.000000
64.000000 0 0.000000
128.000000 0 0.000000
256.000000 0 0.000000
512.000000 0 0.000000
1024.000000 0 0.000000
2048.000000 0 0.000000
4096.000000 0 0.000000
8192.000000 0 0.000000
16384.000000 0 0.000000
32768.000000 0 0.000000
65536.000000 0 0.000000
131072.000000 0 0.000000
262144.000000 0 0.000000
524288.000000 0 0.000000
1048576.000000 0 0.000000
2097152.000000 0 0.000000
4194304.000000 0 0.000000
8388608.000000 0 0.000000
TOO LONG 0 TOO LONG
SET SESSION query_exec_time=default;
SET SESSION query_exec_time=0.1;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=2;
FLUSH QUERY_RESPONSE_TIME;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
CALL test_f(0.31);
CALL test_f(0.32);
CALL test_f(0.33);
CALL test_f(0.34);
CALL test_f(0.35);
CALL test_f(0.36);
CALL test_f(0.37);
CALL test_f(0.38);
CALL test_f(0.39);
CALL test_f(0.4);
CALL test_f(1.1);
CALL test_f(1.2);
CALL test_f(1.3);
CALL test_f(1.5);
CALL test_f(1.4);
CALL test_f(0.5);
CALL test_f(2.1);
CALL test_f(2.3);
CALL test_f(2.5);
CALL test_f(3.1);
CALL test_f(4.1);
CALL test_f(5.1);
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 2
SHOW QUERY_RESPONSE_TIME;
0.000001 45 0.000000
0.000003 0 0.000000
0.000007 0 0.000000
0.000015 0 0.000000
0.000030 0 0.000000
0.000061 0 0.000000
0.000122 0 0.000000
0.000244 0 0.000000
0.000488 0 0.000000
0.000976 0 0.000000
0.001953 0 0.000000
0.003906 0 0.000000
0.007812 0 0.000000
0.015625 0 0.000000
0.031250 0 0.000000
0.062500 0 0.000000
0.125000 44 4.400000
0.250000 0 0.000000
0.500000 10 3.550000
1.000000 1 0.500000
2.000000 5 6.500000
4.000000 4 10.000000
8.000000 2 9.199999
16.000000 0 0.000000
32.000000 0 0.000000
64.000000 0 0.000000
128.000000 0 0.000000
256.000000 0 0.000000
512.000000 0 0.000000
1024.000000 0 0.000000
2048.000000 0 0.000000
4096.000000 0 0.000000
8192.000000 0 0.000000
16384.000000 0 0.000000
32768.000000 0 0.000000
65536.000000 0 0.000000
131072.000000 0 0.000000
262144.000000 0 0.000000
524288.000000 0 0.000000
1048576.000000 0 0.000000
2097152.000000 0 0.000000
4194304.000000 0 0.000000
8388608.000000 0 0.000000
TOO LONG 0 TOO LONG
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
time count total
0.000001 45 0.000000
0.000003 0 0.000000
0.000007 0 0.000000
0.000015 0 0.000000
0.000030 0 0.000000
0.000061 0 0.000000
0.000122 0 0.000000
0.000244 0 0.000000
0.000488 0 0.000000
0.000976 0 0.000000
0.001953 0 0.000000
0.003906 0 0.000000
0.007812 0 0.000000
0.015625 0 0.000000
0.031250 0 0.000000
0.062500 0 0.000000
0.125000 44 4.400000
0.250000 0 0.000000
0.500000 10 3.550000
1.000000 1 0.500000
2.000000 5 6.500000
4.000000 4 10.000000
8.000000 2 9.199999
16.000000 0 0.000000
32.000000 0 0.000000
64.000000 0 0.000000
128.000000 0 0.000000
256.000000 0 0.000000
512.000000 0 0.000000
1024.000000 0 0.000000
2048.000000 0 0.000000
4096.000000 0 0.000000
8192.000000 0 0.000000
16384.000000 0 0.000000
32768.000000 0 0.000000
65536.000000 0 0.000000
131072.000000 0 0.000000
262144.000000 0 0.000000
524288.000000 0 0.000000
1048576.000000 0 0.000000
2097152.000000 0 0.000000
4194304.000000 0 0.000000
8388608.000000 0 0.000000
TOO LONG 0 TOO LONG
SET SESSION query_exec_time=default;
SET SESSION query_exec_time=0.1;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=10;
FLUSH QUERY_RESPONSE_TIME;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
CALL test_f(0.31);
CALL test_f(0.32);
CALL test_f(0.33);
CALL test_f(0.34);
CALL test_f(0.35);
CALL test_f(0.36);
CALL test_f(0.37);
CALL test_f(0.38);
CALL test_f(0.39);
CALL test_f(0.4);
CALL test_f(1.1);
CALL test_f(1.2);
CALL test_f(1.3);
CALL test_f(1.5);
CALL test_f(1.4);
CALL test_f(0.5);
CALL test_f(2.1);
CALL test_f(2.3);
CALL test_f(2.5);
CALL test_f(3.1);
CALL test_f(4.1);
CALL test_f(5.1);
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 10
SHOW QUERY_RESPONSE_TIME;
0.000001 45 0.000000
0.000010 0 0.000000
0.000100 0 0.000000
0.001000 0 0.000000
0.010000 0 0.000000
0.100000 0 0.000000
1.000000 55 8.450000
10.000000 11 25.699999
100.000000 0 0.000000
1000.000000 0 0.000000
10000.000000 0 0.000000
100000.000000 0 0.000000
1000000.000000 0 0.000000
TOO LONG 0 TOO LONG
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
time count total
0.000001 45 0.000000
0.000010 0 0.000000
0.000100 0 0.000000
0.001000 0 0.000000
0.010000 0 0.000000
0.100000 0 0.000000
1.000000 55 8.450000
10.000000 11 25.699999
100.000000 0 0.000000
1000.000000 0 0.000000
10000.000000 0 0.000000
100000.000000 0 0.000000
1000000.000000 0 0.000000
TOO LONG 0 TOO LONG
SET SESSION query_exec_time=default;
SET SESSION query_exec_time=0.1;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=7;
FLUSH QUERY_RESPONSE_TIME;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
CALL test_f(0.31);
CALL test_f(0.32);
CALL test_f(0.33);
CALL test_f(0.34);
CALL test_f(0.35);
CALL test_f(0.36);
CALL test_f(0.37);
CALL test_f(0.38);
CALL test_f(0.39);
CALL test_f(0.4);
CALL test_f(1.1);
CALL test_f(1.2);
CALL test_f(1.3);
CALL test_f(1.5);
CALL test_f(1.4);
CALL test_f(0.5);
CALL test_f(2.1);
CALL test_f(2.3);
CALL test_f(2.5);
CALL test_f(3.1);
CALL test_f(4.1);
CALL test_f(5.1);
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 7
SHOW QUERY_RESPONSE_TIME;
0.000001 45 0.000000
0.000008 0 0.000000
0.000059 0 0.000000
0.000416 0 0.000000
0.002915 0 0.000000
0.020408 0 0.000000
0.142857 44 4.400000
1.000000 11 4.050000
7.000000 11 25.699999
49.000000 0 0.000000
343.000000 0 0.000000
2401.000000 0 0.000000
16807.000000 0 0.000000
117649.000000 0 0.000000
823543.000000 0 0.000000
5764801.000000 0 0.000000
TOO LONG 0 TOO LONG
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
time count total
0.000001 45 0.000000
0.000008 0 0.000000
0.000059 0 0.000000
0.000416 0 0.000000
0.002915 0 0.000000
0.020408 0 0.000000
0.142857 44 4.400000
1.000000 11 4.050000
7.000000 11 25.699999
49.000000 0 0.000000
343.000000 0 0.000000
2401.000000 0 0.000000
16807.000000 0 0.000000
117649.000000 0 0.000000
823543.000000 0 0.000000
5764801.000000 0 0.000000
TOO LONG 0 TOO LONG
SET SESSION query_exec_time=default;
SET SESSION query_exec_time=0.1;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=156;
FLUSH QUERY_RESPONSE_TIME;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
CALL test_f(0.31);
CALL test_f(0.32);
CALL test_f(0.33);
CALL test_f(0.34);
CALL test_f(0.35);
CALL test_f(0.36);
CALL test_f(0.37);
CALL test_f(0.38);
CALL test_f(0.39);
CALL test_f(0.4);
CALL test_f(1.1);
CALL test_f(1.2);
CALL test_f(1.3);
CALL test_f(1.5);
CALL test_f(1.4);
CALL test_f(0.5);
CALL test_f(2.1);
CALL test_f(2.3);
CALL test_f(2.5);
CALL test_f(3.1);
CALL test_f(4.1);
CALL test_f(5.1);
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 156
SHOW QUERY_RESPONSE_TIME;
0.000041 45 0.000000
0.006410 0 0.000000
1.000000 55 8.450000
156.000000 11 25.699999
24336.000000 0 0.000000
3796416.000000 0 0.000000
TOO LONG 0 TOO LONG
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
time count total
0.000041 45 0.000000
0.006410 0 0.000000
1.000000 55 8.450000
156.000000 11 25.699999
24336.000000 0 0.000000
3796416.000000 0 0.000000
TOO LONG 0 TOO LONG
SET SESSION query_exec_time=default;
SET SESSION query_exec_time=0.1;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1000;
FLUSH QUERY_RESPONSE_TIME;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
CALL test_f(0.31);
CALL test_f(0.32);
CALL test_f(0.33);
CALL test_f(0.34);
CALL test_f(0.35);
CALL test_f(0.36);
CALL test_f(0.37);
CALL test_f(0.38);
CALL test_f(0.39);
CALL test_f(0.4);
CALL test_f(1.1);
CALL test_f(1.2);
CALL test_f(1.3);
CALL test_f(1.5);
CALL test_f(1.4);
CALL test_f(0.5);
CALL test_f(2.1);
CALL test_f(2.3);
CALL test_f(2.5);
CALL test_f(3.1);
CALL test_f(4.1);
CALL test_f(5.1);
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 1000
SHOW QUERY_RESPONSE_TIME;
0.000001 45 0.000000
0.001000 0 0.000000
1.000000 55 8.450000
1000.000000 11 25.699999
1000000.000000 0 0.000000
TOO LONG 0 TOO LONG
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
time count total
0.000001 45 0.000000
0.001000 0 0.000000
1.000000 55 8.450000
1000.000000 11 25.699999
1000000.000000 0 0.000000
TOO LONG 0 TOO LONG
SET SESSION query_exec_time=default;
SET SESSION query_exec_time=0.1;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1001;
Warnings:
Warning 1292 Truncated incorrect query_response_time_range_base value: '1001'
FLUSH QUERY_RESPONSE_TIME;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
CALL test_f(0.31);
CALL test_f(0.32);
CALL test_f(0.33);
CALL test_f(0.34);
CALL test_f(0.35);
CALL test_f(0.36);
CALL test_f(0.37);
CALL test_f(0.38);
CALL test_f(0.39);
CALL test_f(0.4);
CALL test_f(1.1);
CALL test_f(1.2);
CALL test_f(1.3);
CALL test_f(1.5);
CALL test_f(1.4);
CALL test_f(0.5);
CALL test_f(2.1);
CALL test_f(2.3);
CALL test_f(2.5);
CALL test_f(3.1);
CALL test_f(4.1);
CALL test_f(5.1);
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 1000
SHOW QUERY_RESPONSE_TIME;
0.000001 45 0.000000
0.001000 0 0.000000
1.000000 55 8.450000
1000.000000 11 25.699999
1000000.000000 0 0.000000
TOO LONG 0 TOO LONG
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
time count total
0.000001 45 0.000000
0.001000 0 0.000000
1.000000 55 8.450000
1000.000000 11 25.699999
1000000.000000 0 0.000000
TOO LONG 0 TOO LONG
SET SESSION query_exec_time=default;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=default;
DROP PROCEDURE test_f;
DROP TABLE t;