| 1 |
create user foo@localhost; |
| 2 |
grant ALL on *.* to foo@localhost; |
| 3 |
|
| 4 |
==================================================================== |
| 5 |
Testing index for columns HOST |
| 6 |
==================================================================== |
| 7 |
############ Explain for Query #################################### |
| 8 |
explain select TOTAL_CONNECTIONS |
| 9 |
from performance_schema.hosts |
| 10 |
where HOST = "impossible"; |
| 11 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 12 |
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL # NULL no matching row in const table |
| 13 |
############ Explain for Query #################################### |
| 14 |
explain select TOTAL_CONNECTIONS |
| 15 |
from performance_schema.hosts |
| 16 |
where HOST > "impossible"; |
| 17 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 18 |
1 SIMPLE hosts NULL ALL HOST NULL NULL NULL # 33.33 Using where |
| 19 |
############ Explain for Query #################################### |
| 20 |
explain select TOTAL_CONNECTIONS |
| 21 |
from performance_schema.hosts |
| 22 |
where HOST < "2"; |
| 23 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 24 |
1 SIMPLE hosts NULL ALL HOST NULL NULL NULL # 33.33 Using where |
| 25 |
############ Explain for Query #################################### |
| 26 |
explain select TOTAL_CONNECTIONS |
| 27 |
from performance_schema.hosts |
| 28 |
where HOST = "localhost"; |
| 29 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 30 |
1 SIMPLE hosts NULL const HOST HOST 256 const # 100.00 NULL |
| 31 |
############# Explain End ######################################### |
| 32 |
flush status; |
| 33 |
select TOTAL_CONNECTIONS |
| 34 |
from performance_schema.hosts |
| 35 |
where HOST = "localhost"; |
| 36 |
TOTAL_CONNECTIONS |
| 37 |
# |
| 38 |
OK: handler_read_key incremented |
| 39 |
drop user foo@localhost; |