225 lines
35 KiB
Plaintext
225 lines
35 KiB
Plaintext
select connection_id() into @conid;
|
|
select thread_id from performance_schema.threads
|
|
where PROCESSLIST_ID = @conid
|
|
into @tid;
|
|
select thread_os_id from performance_schema.threads
|
|
where PROCESSLIST_ID = @conid
|
|
into @osid;
|
|
explain select THREAD_ID, NAME from performance_schema.threads
|
|
where thread_id = 1;
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL const PRIMARY PRIMARY 8 const 1 100.00 NULL
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select '1' AS `THREAD_ID`,'thread/sql/main' AS `NAME` from `performance_schema`.`threads` where true
|
|
explain select * from performance_schema.threads
|
|
where thread_id > 1;
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ALL PRIMARY NULL NULL NULL 256 33.33 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`THREAD_ID` > 1)
|
|
explain select * from performance_schema.threads
|
|
where thread_id < 1;
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ALL PRIMARY NULL NULL NULL 256 33.33 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`THREAD_ID` < 1)
|
|
select processlist_id = @conid, name, processlist_info
|
|
from performance_schema.threads
|
|
where thread_id = @tid;
|
|
processlist_id = @conid name processlist_info
|
|
1 thread/sql/one_connection select processlist_id = @conid, name, processlist_info
|
|
from performance_schema.threads
|
|
where thread_id = @tid
|
|
explain select THREAD_ID, NAME from performance_schema.threads
|
|
where processlist_id = @conid;
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ref PROCESSLIST_ID PROCESSLIST_ID 9 const 10 100.00 Using where
|
|
explain select * from performance_schema.threads
|
|
where processlist_id > 99999;
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ALL PROCESSLIST_ID NULL NULL NULL 256 33.33 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`PROCESSLIST_ID` > 99999)
|
|
explain select * from performance_schema.threads
|
|
where processlist_id < 99999;
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ALL PROCESSLIST_ID NULL NULL NULL 256 33.33 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`PROCESSLIST_ID` < 99999)
|
|
select thread_id = @tid, name, processlist_info
|
|
from performance_schema.threads
|
|
where processlist_id = @conid;
|
|
thread_id = @tid name processlist_info
|
|
1 thread/sql/one_connection select thread_id = @tid, name, processlist_info
|
|
from performance_schema.threads
|
|
where processlist_id = @conid
|
|
explain select THREAD_ID, NAME from performance_schema.threads
|
|
where thread_os_id = @osid;
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ref THREAD_OS_ID THREAD_OS_ID 9 const 10 100.00 Using where
|
|
explain select * from performance_schema.threads
|
|
where thread_os_id > 99999;
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ALL THREAD_OS_ID NULL NULL NULL 256 33.33 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`THREAD_OS_ID` > 99999)
|
|
explain select * from performance_schema.threads
|
|
where thread_os_id < 99999;
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ALL THREAD_OS_ID NULL NULL NULL 256 33.33 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`THREAD_OS_ID` < 99999)
|
|
select thread_id - @tid, name, processlist_info
|
|
from performance_schema.threads
|
|
where thread_os_id = @osid;
|
|
thread_id - @tid name processlist_info
|
|
0 thread/sql/one_connection select thread_id - @tid, name, processlist_info
|
|
from performance_schema.threads
|
|
where thread_os_id = @osid
|
|
explain select THREAD_ID from performance_schema.threads
|
|
where NAME = "impossible";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ref NAME NAME 514 const 10 100.00 NULL
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`NAME` = 'impossible')
|
|
explain select THREAD_ID from performance_schema.threads
|
|
where NAME = "thread/sql/main";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ref NAME NAME 514 const 10 100.00 NULL
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`NAME` = 'thread/sql/main')
|
|
explain select * from performance_schema.threads
|
|
where NAME > "foo";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ALL NAME NULL NULL NULL 256 33.33 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`NAME` > 'foo')
|
|
explain select * from performance_schema.threads
|
|
where NAME < "bar";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ALL NAME NULL NULL NULL 256 33.33 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`NAME` < 'bar')
|
|
explain select * from performance_schema.threads
|
|
where NAME like "thread/sql/%";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ALL NAME NULL NULL NULL 256 11.11 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`NAME` like 'thread/sql/%')
|
|
select thread_id, name, processlist_state, processlist_info
|
|
from performance_schema.threads
|
|
where NAME = "thread/sql/main";
|
|
thread_id name processlist_state processlist_info
|
|
1 thread/sql/main NULL NULL
|
|
explain select THREAD_ID from performance_schema.threads
|
|
where PROCESSLIST_USER = "impossible";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ref PROCESSLIST_ACCOUNT PROCESSLIST_ACCOUNT 131 const 10 100.00 NULL
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`PROCESSLIST_USER` = 'impossible')
|
|
explain select THREAD_ID from performance_schema.threads
|
|
where PROCESSLIST_USER = "root";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ref PROCESSLIST_ACCOUNT PROCESSLIST_ACCOUNT 131 const 10 100.00 NULL
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`PROCESSLIST_USER` = 'root')
|
|
explain select * from performance_schema.threads
|
|
where PROCESSLIST_USER > "foo";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ALL PROCESSLIST_ACCOUNT NULL NULL NULL 256 33.33 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`PROCESSLIST_USER` > 'foo')
|
|
explain select * from performance_schema.threads
|
|
where PROCESSLIST_USER < "bar";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ALL PROCESSLIST_ACCOUNT NULL NULL NULL 256 33.33 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`PROCESSLIST_USER` < 'bar')
|
|
explain select * from performance_schema.threads
|
|
where PROCESSLIST_USER like "ro%";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ALL PROCESSLIST_ACCOUNT NULL NULL NULL 256 11.11 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`PROCESSLIST_USER` like 'ro%')
|
|
select thread_id = @tid, name, processlist_state, processlist_info
|
|
from performance_schema.threads
|
|
where PROCESSLIST_USER = "root";
|
|
thread_id = @tid name processlist_state processlist_info
|
|
1 thread/sql/one_connection executing select thread_id = @tid, name, processlist_state, processlist_info
|
|
from performance_schema.threads
|
|
where PROCESSLIST_USER = "root"
|
|
explain select THREAD_ID from performance_schema.threads
|
|
where PROCESSLIST_USER = "impossible" and PROCESSLIST_HOST = "impossible";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ref PROCESSLIST_ACCOUNT,PROCESSLIST_HOST PROCESSLIST_ACCOUNT 389 const,const 10 100.00 NULL
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID` from `performance_schema`.`threads` where ((`performance_schema`.`threads`.`PROCESSLIST_HOST` = 'impossible') and (`performance_schema`.`threads`.`PROCESSLIST_USER` = 'impossible'))
|
|
explain select THREAD_ID from performance_schema.threads
|
|
where PROCESSLIST_USER = "root" and PROCESSLIST_HOST = "localhost";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ref PROCESSLIST_ACCOUNT,PROCESSLIST_HOST PROCESSLIST_ACCOUNT 389 const,const 10 100.00 NULL
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID` from `performance_schema`.`threads` where ((`performance_schema`.`threads`.`PROCESSLIST_HOST` = 'localhost') and (`performance_schema`.`threads`.`PROCESSLIST_USER` = 'root'))
|
|
explain select * from performance_schema.threads
|
|
where PROCESSLIST_USER = "foo" and PROCESSLIST_HOST < "foo";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ref PROCESSLIST_ACCOUNT,PROCESSLIST_HOST PROCESSLIST_ACCOUNT 131 const 10 33.33 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where ((`performance_schema`.`threads`.`PROCESSLIST_USER` = 'foo') and (`performance_schema`.`threads`.`PROCESSLIST_HOST` < 'foo'))
|
|
explain select * from performance_schema.threads
|
|
where PROCESSLIST_USER = "foo" and PROCESSLIST_HOST > "bar";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ref PROCESSLIST_ACCOUNT,PROCESSLIST_HOST PROCESSLIST_ACCOUNT 131 const 10 33.33 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where ((`performance_schema`.`threads`.`PROCESSLIST_USER` = 'foo') and (`performance_schema`.`threads`.`PROCESSLIST_HOST` > 'bar'))
|
|
explain select * from performance_schema.threads
|
|
where PROCESSLIST_USER = "foo" and PROCESSLIST_HOST like "bar%";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ref PROCESSLIST_ACCOUNT,PROCESSLIST_HOST PROCESSLIST_ACCOUNT 131 const 10 11.11 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where ((`performance_schema`.`threads`.`PROCESSLIST_USER` = 'foo') and (`performance_schema`.`threads`.`PROCESSLIST_HOST` like 'bar%'))
|
|
select thread_id = @tid, name, processlist_state, processlist_info
|
|
from performance_schema.threads
|
|
where PROCESSLIST_USER = "root" and PROCESSLIST_HOST = "localhost";
|
|
thread_id = @tid name processlist_state processlist_info
|
|
1 thread/sql/one_connection executing select thread_id = @tid, name, processlist_state, processlist_info
|
|
from performance_schema.threads
|
|
where PROCESSLIST_USER = "root" and PROCESSLIST_HOST = "localhost"
|
|
explain select THREAD_ID from performance_schema.threads
|
|
where PROCESSLIST_HOST = "impossible";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ref PROCESSLIST_HOST PROCESSLIST_HOST 258 const 10 100.00 NULL
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`PROCESSLIST_HOST` = 'impossible')
|
|
explain select THREAD_ID from performance_schema.threads
|
|
where PROCESSLIST_HOST = "localhost";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ref PROCESSLIST_HOST PROCESSLIST_HOST 258 const 10 100.00 NULL
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`PROCESSLIST_HOST` = 'localhost')
|
|
explain select * from performance_schema.threads
|
|
where PROCESSLIST_HOST > "foo";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ALL PROCESSLIST_HOST NULL NULL NULL 256 33.33 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`PROCESSLIST_HOST` > 'foo')
|
|
explain select * from performance_schema.threads
|
|
where PROCESSLIST_HOST < "bar";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ALL PROCESSLIST_HOST NULL NULL NULL 256 33.33 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`PROCESSLIST_HOST` < 'bar')
|
|
explain select * from performance_schema.threads
|
|
where PROCESSLIST_HOST like "local%";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE threads NULL ALL PROCESSLIST_HOST NULL NULL NULL 256 11.11 Using where
|
|
Warnings:
|
|
Note 1003 /* select#1 */ select `performance_schema`.`threads`.`THREAD_ID` AS `THREAD_ID`,`performance_schema`.`threads`.`NAME` AS `NAME`,`performance_schema`.`threads`.`TYPE` AS `TYPE`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `PROCESSLIST_ID`,`performance_schema`.`threads`.`PROCESSLIST_USER` AS `PROCESSLIST_USER`,`performance_schema`.`threads`.`PROCESSLIST_HOST` AS `PROCESSLIST_HOST`,`performance_schema`.`threads`.`PROCESSLIST_DB` AS `PROCESSLIST_DB`,`performance_schema`.`threads`.`PROCESSLIST_COMMAND` AS `PROCESSLIST_COMMAND`,`performance_schema`.`threads`.`PROCESSLIST_TIME` AS `PROCESSLIST_TIME`,`performance_schema`.`threads`.`PROCESSLIST_STATE` AS `PROCESSLIST_STATE`,`performance_schema`.`threads`.`PROCESSLIST_INFO` AS `PROCESSLIST_INFO`,`performance_schema`.`threads`.`PARENT_THREAD_ID` AS `PARENT_THREAD_ID`,`performance_schema`.`threads`.`ROLE` AS `ROLE`,`performance_schema`.`threads`.`INSTRUMENTED` AS `INSTRUMENTED`,`performance_schema`.`threads`.`HISTORY` AS `HISTORY`,`performance_schema`.`threads`.`CONNECTION_TYPE` AS `CONNECTION_TYPE`,`performance_schema`.`threads`.`THREAD_OS_ID` AS `THREAD_OS_ID`,`performance_schema`.`threads`.`RESOURCE_GROUP` AS `RESOURCE_GROUP` from `performance_schema`.`threads` where (`performance_schema`.`threads`.`PROCESSLIST_HOST` like 'local%')
|
|
select thread_id = @tid, name, processlist_state, processlist_info
|
|
from performance_schema.threads
|
|
where PROCESSLIST_HOST = "localhost";
|
|
thread_id = @tid name processlist_state processlist_info
|
|
1 thread/sql/one_connection executing select thread_id = @tid, name, processlist_state, processlist_info
|
|
from performance_schema.threads
|
|
where PROCESSLIST_HOST = "localhost"
|