75 lines
3.9 KiB
Plaintext
75 lines
3.9 KiB
Plaintext
select PROCESSLIST_ID from performance_schema.session_account_connect_attrs limit 1
|
|
into @plid;
|
|
|
|
====================================================================
|
|
Testing index for columns PROCESSLIST_ID, ATTR_NAME
|
|
====================================================================
|
|
############ Explain for Query ####################################
|
|
explain select ORDINAL_POSITION
|
|
from performance_schema.session_account_connect_attrs
|
|
where PROCESSLIST_ID = "impossible";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE session_account_connect_attrs NULL ref PRIMARY PRIMARY 8 const # 100.00 Using where
|
|
############ Explain for Query ####################################
|
|
explain select ORDINAL_POSITION
|
|
from performance_schema.session_account_connect_attrs
|
|
where PROCESSLIST_ID > "impossible";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE session_account_connect_attrs NULL ALL PRIMARY NULL NULL NULL # 33.33 Using where
|
|
############ Explain for Query ####################################
|
|
explain select ORDINAL_POSITION
|
|
from performance_schema.session_account_connect_attrs
|
|
where PROCESSLIST_ID < "2";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE session_account_connect_attrs NULL ALL PRIMARY NULL NULL NULL # 33.33 Using where
|
|
############ Explain for Query ####################################
|
|
explain select ORDINAL_POSITION
|
|
from performance_schema.session_account_connect_attrs
|
|
where PROCESSLIST_ID = @plid;
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE session_account_connect_attrs NULL ref PRIMARY PRIMARY 8 const # 100.00 Using where
|
|
############ Explain for Query ####################################
|
|
explain select ORDINAL_POSITION
|
|
from performance_schema.session_account_connect_attrs
|
|
where PROCESSLIST_ID = "impossible"
|
|
and ATTR_NAME = "impossible";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL # NULL no matching row in const table
|
|
############ Explain for Query ####################################
|
|
explain select ORDINAL_POSITION
|
|
from performance_schema.session_account_connect_attrs
|
|
where PROCESSLIST_ID = @plid
|
|
and ATTR_NAME = "impossible";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL # NULL no matching row in const table
|
|
############ Explain for Query ####################################
|
|
explain select ORDINAL_POSITION
|
|
from performance_schema.session_account_connect_attrs
|
|
where PROCESSLIST_ID = @plid
|
|
and ATTR_NAME > "impossible";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE session_account_connect_attrs NULL ref PRIMARY PRIMARY 8 const # 33.33 Using where
|
|
############ Explain for Query ####################################
|
|
explain select ORDINAL_POSITION
|
|
from performance_schema.session_account_connect_attrs
|
|
where PROCESSLIST_ID = @plid
|
|
and ATTR_NAME < "2";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE session_account_connect_attrs NULL ref PRIMARY PRIMARY 8 const # 33.33 Using where
|
|
############ Explain for Query ####################################
|
|
explain select ORDINAL_POSITION
|
|
from performance_schema.session_account_connect_attrs
|
|
where PROCESSLIST_ID = @plid
|
|
and ATTR_NAME = "_os";
|
|
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE session_account_connect_attrs NULL const PRIMARY PRIMARY 138 const,const # 100.00 NULL
|
|
############# Explain End #########################################
|
|
flush status;
|
|
select ORDINAL_POSITION
|
|
from performance_schema.session_account_connect_attrs
|
|
where PROCESSLIST_ID = @plid
|
|
and ATTR_NAME = "_os";
|
|
ORDINAL_POSITION
|
|
#
|
|
OK: handler_read_key incremented
|