| 1 |
select OBJECT_INSTANCE_BEGIN from performance_schema.events_waits_summary_by_instance limit 1 |
| 2 |
into @oib; |
| 3 |
select EVENT_NAME from performance_schema.events_waits_summary_by_instance limit 1 |
| 4 |
into @ename; |
| 5 |
|
| 6 |
==================================================================== |
| 7 |
Testing index for columns OBJECT_INSTANCE_BEGIN |
| 8 |
==================================================================== |
| 9 |
############ Explain for Query #################################### |
| 10 |
explain select COUNT_STAR |
| 11 |
from performance_schema.events_waits_summary_by_instance |
| 12 |
where OBJECT_INSTANCE_BEGIN = "impossible"; |
| 13 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 14 |
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL # NULL no matching row in const table |
| 15 |
############ Explain for Query #################################### |
| 16 |
explain select COUNT_STAR |
| 17 |
from performance_schema.events_waits_summary_by_instance |
| 18 |
where OBJECT_INSTANCE_BEGIN > "impossible"; |
| 19 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 20 |
1 SIMPLE events_waits_summary_by_instance NULL ALL PRIMARY NULL NULL NULL # 33.33 Using where |
| 21 |
############ Explain for Query #################################### |
| 22 |
explain select COUNT_STAR |
| 23 |
from performance_schema.events_waits_summary_by_instance |
| 24 |
where OBJECT_INSTANCE_BEGIN < "2"; |
| 25 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 26 |
1 SIMPLE events_waits_summary_by_instance NULL ALL PRIMARY NULL NULL NULL # 33.33 Using where |
| 27 |
############ Explain for Query #################################### |
| 28 |
explain select COUNT_STAR |
| 29 |
from performance_schema.events_waits_summary_by_instance |
| 30 |
where OBJECT_INSTANCE_BEGIN = @oib; |
| 31 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 32 |
1 SIMPLE events_waits_summary_by_instance NULL const PRIMARY PRIMARY 8 const # 100.00 NULL |
| 33 |
############# Explain End ######################################### |
| 34 |
flush status; |
| 35 |
select COUNT_STAR |
| 36 |
from performance_schema.events_waits_summary_by_instance |
| 37 |
where OBJECT_INSTANCE_BEGIN = @oib; |
| 38 |
COUNT_STAR |
| 39 |
# |
| 40 |
OK: handler_read_key incremented |
| 41 |
|
| 42 |
==================================================================== |
| 43 |
Testing index for columns EVENT_NAME |
| 44 |
==================================================================== |
| 45 |
############ Explain for Query #################################### |
| 46 |
explain select COUNT_STAR |
| 47 |
from performance_schema.events_waits_summary_by_instance |
| 48 |
where EVENT_NAME = "impossible"; |
| 49 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 50 |
1 SIMPLE events_waits_summary_by_instance NULL ref EVENT_NAME EVENT_NAME 514 const # 100.00 NULL |
| 51 |
############ Explain for Query #################################### |
| 52 |
explain select COUNT_STAR |
| 53 |
from performance_schema.events_waits_summary_by_instance |
| 54 |
where EVENT_NAME > "impossible"; |
| 55 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 56 |
1 SIMPLE events_waits_summary_by_instance NULL ALL EVENT_NAME NULL NULL NULL # 33.33 Using where |
| 57 |
############ Explain for Query #################################### |
| 58 |
explain select COUNT_STAR |
| 59 |
from performance_schema.events_waits_summary_by_instance |
| 60 |
where EVENT_NAME < "2"; |
| 61 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 62 |
1 SIMPLE events_waits_summary_by_instance NULL ALL EVENT_NAME NULL NULL NULL # 33.33 Using where |
| 63 |
############ Explain for Query #################################### |
| 64 |
explain select COUNT_STAR |
| 65 |
from performance_schema.events_waits_summary_by_instance |
| 66 |
where EVENT_NAME = @ename; |
| 67 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 68 |
1 SIMPLE events_waits_summary_by_instance NULL ref EVENT_NAME EVENT_NAME 514 const # 100.00 NULL |
| 69 |
############# Explain End ######################################### |
| 70 |
flush status; |
| 71 |
select COUNT_STAR |
| 72 |
from performance_schema.events_waits_summary_by_instance |
| 73 |
where EVENT_NAME = @ename; |
| 74 |
COUNT_STAR |
| 75 |
# |
| 76 |
OK: handler_read_key incremented |