| 1 |
create database explain_test_db; |
| 2 |
create table explain_test_db.explain_test_table(c int); |
| 3 |
truncate table performance_schema.table_lock_waits_summary_by_table; |
| 4 |
insert into explain_test_db.explain_test_table values('1'); |
| 5 |
|
| 6 |
==================================================================== |
| 7 |
Testing index for columns OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME |
| 8 |
==================================================================== |
| 9 |
############ Explain for Query #################################### |
| 10 |
explain select COUNT_STAR |
| 11 |
from performance_schema.table_lock_waits_summary_by_table |
| 12 |
where OBJECT_TYPE = "impossible"; |
| 13 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 14 |
1 SIMPLE table_lock_waits_summary_by_table NULL ref OBJECT OBJECT 259 const # 100.00 NULL |
| 15 |
############ Explain for Query #################################### |
| 16 |
explain select COUNT_STAR |
| 17 |
from performance_schema.table_lock_waits_summary_by_table |
| 18 |
where OBJECT_TYPE > "impossible"; |
| 19 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 20 |
1 SIMPLE table_lock_waits_summary_by_table NULL ALL OBJECT NULL NULL NULL # 33.33 Using where |
| 21 |
############ Explain for Query #################################### |
| 22 |
explain select COUNT_STAR |
| 23 |
from performance_schema.table_lock_waits_summary_by_table |
| 24 |
where OBJECT_TYPE < "2"; |
| 25 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 26 |
1 SIMPLE table_lock_waits_summary_by_table NULL ALL OBJECT NULL NULL NULL # 33.33 Using where |
| 27 |
############ Explain for Query #################################### |
| 28 |
explain select COUNT_STAR |
| 29 |
from performance_schema.table_lock_waits_summary_by_table |
| 30 |
where OBJECT_TYPE = "TABLE"; |
| 31 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 32 |
1 SIMPLE table_lock_waits_summary_by_table NULL ref OBJECT OBJECT 259 const # 100.00 NULL |
| 33 |
############ Explain for Query #################################### |
| 34 |
explain select COUNT_STAR |
| 35 |
from performance_schema.table_lock_waits_summary_by_table |
| 36 |
where OBJECT_TYPE = "impossible" |
| 37 |
and OBJECT_SCHEMA = "impossible"; |
| 38 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 39 |
1 SIMPLE table_lock_waits_summary_by_table NULL ref OBJECT OBJECT 518 const,const # 100.00 NULL |
| 40 |
############ Explain for Query #################################### |
| 41 |
explain select COUNT_STAR |
| 42 |
from performance_schema.table_lock_waits_summary_by_table |
| 43 |
where OBJECT_TYPE = "TABLE" |
| 44 |
and OBJECT_SCHEMA = "impossible"; |
| 45 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 46 |
1 SIMPLE table_lock_waits_summary_by_table NULL ref OBJECT OBJECT 518 const,const # 100.00 NULL |
| 47 |
############ Explain for Query #################################### |
| 48 |
explain select COUNT_STAR |
| 49 |
from performance_schema.table_lock_waits_summary_by_table |
| 50 |
where OBJECT_TYPE = "TABLE" |
| 51 |
and OBJECT_SCHEMA > "impossible"; |
| 52 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 53 |
1 SIMPLE table_lock_waits_summary_by_table NULL ref OBJECT OBJECT 259 const # 33.33 Using where |
| 54 |
############ Explain for Query #################################### |
| 55 |
explain select COUNT_STAR |
| 56 |
from performance_schema.table_lock_waits_summary_by_table |
| 57 |
where OBJECT_TYPE = "TABLE" |
| 58 |
and OBJECT_SCHEMA < "2"; |
| 59 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 60 |
1 SIMPLE table_lock_waits_summary_by_table NULL ref OBJECT OBJECT 259 const # 33.33 Using where |
| 61 |
############ Explain for Query #################################### |
| 62 |
explain select COUNT_STAR |
| 63 |
from performance_schema.table_lock_waits_summary_by_table |
| 64 |
where OBJECT_TYPE = "TABLE" |
| 65 |
and OBJECT_SCHEMA = "explain_test_db"; |
| 66 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 67 |
1 SIMPLE table_lock_waits_summary_by_table NULL ref OBJECT OBJECT 518 const,const # 100.00 NULL |
| 68 |
############ Explain for Query #################################### |
| 69 |
explain select COUNT_STAR |
| 70 |
from performance_schema.table_lock_waits_summary_by_table |
| 71 |
where OBJECT_TYPE = "impossible" |
| 72 |
and OBJECT_SCHEMA = "impossible" |
| 73 |
and OBJECT_NAME = "impossible"; |
| 74 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 75 |
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL # NULL no matching row in const table |
| 76 |
############ Explain for Query #################################### |
| 77 |
explain select COUNT_STAR |
| 78 |
from performance_schema.table_lock_waits_summary_by_table |
| 79 |
where OBJECT_TYPE = "TABLE" |
| 80 |
and OBJECT_SCHEMA = "explain_test_db" |
| 81 |
and OBJECT_NAME = "impossible"; |
| 82 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 83 |
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL # NULL no matching row in const table |
| 84 |
############ Explain for Query #################################### |
| 85 |
explain select COUNT_STAR |
| 86 |
from performance_schema.table_lock_waits_summary_by_table |
| 87 |
where OBJECT_TYPE = "TABLE" |
| 88 |
and OBJECT_SCHEMA = "explain_test_db" |
| 89 |
and OBJECT_NAME > "impossible"; |
| 90 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 91 |
1 SIMPLE table_lock_waits_summary_by_table NULL ref OBJECT OBJECT 518 const,const # 33.33 Using where |
| 92 |
############ Explain for Query #################################### |
| 93 |
explain select COUNT_STAR |
| 94 |
from performance_schema.table_lock_waits_summary_by_table |
| 95 |
where OBJECT_TYPE = "TABLE" |
| 96 |
and OBJECT_SCHEMA = "explain_test_db" |
| 97 |
and OBJECT_NAME < "2"; |
| 98 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 99 |
1 SIMPLE table_lock_waits_summary_by_table NULL ref OBJECT OBJECT 518 const,const # 33.33 Using where |
| 100 |
############ Explain for Query #################################### |
| 101 |
explain select COUNT_STAR |
| 102 |
from performance_schema.table_lock_waits_summary_by_table |
| 103 |
where OBJECT_TYPE = "TABLE" |
| 104 |
and OBJECT_SCHEMA = "explain_test_db" |
| 105 |
and OBJECT_NAME = "explain_test_table"; |
| 106 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 107 |
1 SIMPLE table_lock_waits_summary_by_table NULL const OBJECT OBJECT 777 const,const,const # 100.00 NULL |
| 108 |
############# Explain End ######################################### |
| 109 |
flush status; |
| 110 |
select COUNT_STAR |
| 111 |
from performance_schema.table_lock_waits_summary_by_table |
| 112 |
where OBJECT_TYPE = "TABLE" |
| 113 |
and OBJECT_SCHEMA = "explain_test_db" |
| 114 |
and OBJECT_NAME = "explain_test_table"; |
| 115 |
COUNT_STAR |
| 116 |
# |
| 117 |
OK: handler_read_key incremented |
| 118 |
drop table explain_test_db.explain_test_table; |
| 119 |
drop database explain_test_db; |