mirror of
https://github.com/MariaDB/server.git
synced 2025-11-22 17:44:29 +03:00
Patch contributed by Jeremy Cole. CLA received Oct 2006 by Kaj Arnö Add rudimentary query profiling support.
40 lines
1.0 KiB
Plaintext
40 lines
1.0 KiB
Plaintext
|
|
create table t1 (
|
|
a int,
|
|
b int
|
|
);
|
|
--disable_result_log
|
|
insert into t1 values (1,1), (2,null), (3, 4);
|
|
insert into t1 values (5,1), (6,null), (7, 4);
|
|
insert into t1 values (1,1), (2,null), (3, 4);
|
|
insert into t1 values (5,1), (6,null), (7, 4);
|
|
insert into t1 values (5,1), (6,null), (7, 4);
|
|
select sum(a) from t1;
|
|
select sum(a) from t1 group by b;
|
|
select sum(a) + sum(b) from t1 group by b;
|
|
select max(x) from (select sum(a) as x from t1 group by b) as teeone;
|
|
|
|
# Merely verify that commands work. Checking values is impossible, right?
|
|
show profiles;
|
|
show profile for query 8;
|
|
show profile cpu, block io for query 8;
|
|
show profile cpu for query 8;
|
|
show profile cpu for query 9 limit 2 offset 2;
|
|
show profile cpu for query 10 limit 0;
|
|
show profile cpu for query 65534;
|
|
show profile memory;
|
|
show profile block io;
|
|
show profile context switches;
|
|
show profile page faults;
|
|
show profile ipc;
|
|
show profile swaps limit 1 offset 2;
|
|
show profile source;
|
|
show profile all for query 0 limit 0;
|
|
--enable_result_log
|
|
|
|
drop table t1;
|
|
|
|
|
|
##
|
|
--echo End of 5.0 tests
|