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