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