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