polardbxengine/mysql-test/suite/xengine_perfschema/r/idx_variables_by_thread.result

77 lines
3.7 KiB
Plaintext

select connection_id() into @conid;
select thread_id from performance_schema.threads
where PROCESSLIST_ID = @conid
into @tid;
====================================================================
Testing index for columns THREAD_ID, VARIABLE_NAME
====================================================================
############ Explain for Query ####################################
explain select VARIABLE_VALUE
from performance_schema.variables_by_thread
where THREAD_ID = "impossible";
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE variables_by_thread NULL ref PRIMARY PRIMARY 8 const # 100.00 Using where
############ Explain for Query ####################################
explain select VARIABLE_VALUE
from performance_schema.variables_by_thread
where THREAD_ID > "impossible";
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE variables_by_thread NULL ALL PRIMARY NULL NULL NULL # 33.33 Using where
############ Explain for Query ####################################
explain select VARIABLE_VALUE
from performance_schema.variables_by_thread
where THREAD_ID < "2";
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE variables_by_thread NULL ALL PRIMARY NULL NULL NULL # 33.33 Using where
############ Explain for Query ####################################
explain select VARIABLE_VALUE
from performance_schema.variables_by_thread
where THREAD_ID = @tid;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE variables_by_thread NULL ref PRIMARY PRIMARY 8 const # 100.00 Using where
############ Explain for Query ####################################
explain select VARIABLE_VALUE
from performance_schema.variables_by_thread
where THREAD_ID = "impossible"
and VARIABLE_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 VARIABLE_VALUE
from performance_schema.variables_by_thread
where THREAD_ID = @tid
and VARIABLE_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 VARIABLE_VALUE
from performance_schema.variables_by_thread
where THREAD_ID = @tid
and VARIABLE_NAME > "impossible";
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE variables_by_thread NULL ref PRIMARY PRIMARY 8 const # 33.33 Using where
############ Explain for Query ####################################
explain select VARIABLE_VALUE
from performance_schema.variables_by_thread
where THREAD_ID = @tid
and VARIABLE_NAME < "2";
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE variables_by_thread NULL ref PRIMARY PRIMARY 8 const # 33.33 Using where
############ Explain for Query ####################################
explain select VARIABLE_VALUE
from performance_schema.variables_by_thread
where THREAD_ID = @tid
and VARIABLE_NAME = "autocommit";
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE variables_by_thread NULL const PRIMARY PRIMARY 266 const,const # 100.00 NULL
############# Explain End #########################################
flush status;
select VARIABLE_VALUE
from performance_schema.variables_by_thread
where THREAD_ID = @tid
and VARIABLE_NAME = "autocommit";
VARIABLE_VALUE
#
OK: handler_read_key incremented