| 1 |
create user foo@localhost; |
| 2 |
grant ALL on *.* to foo@localhost; |
| 3 |
|
| 4 |
==================================================================== |
| 5 |
Testing index for columns HOST, USER, EVENT_NAME |
| 6 |
==================================================================== |
| 7 |
############ Explain for Query #################################### |
| 8 |
explain select COUNT_STAR |
| 9 |
from performance_schema.events_statements_summary_by_account_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_statements_summary_by_account_by_event_name NULL ALL NULL NULL NULL NULL # 10.00 Using where |
| 13 |
############ Explain for Query #################################### |
| 14 |
explain select COUNT_STAR |
| 15 |
from performance_schema.events_statements_summary_by_account_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_statements_summary_by_account_by_event_name NULL ALL NULL NULL NULL NULL # 33.33 Using where |
| 19 |
############ Explain for Query #################################### |
| 20 |
explain select COUNT_STAR |
| 21 |
from performance_schema.events_statements_summary_by_account_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_statements_summary_by_account_by_event_name NULL ALL NULL NULL NULL NULL # 33.33 Using where |
| 25 |
############ Explain for Query #################################### |
| 26 |
explain select COUNT_STAR |
| 27 |
from performance_schema.events_statements_summary_by_account_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_statements_summary_by_account_by_event_name NULL ALL NULL NULL NULL NULL # 10.00 Using where |
| 31 |
############ Explain for Query #################################### |
| 32 |
explain select COUNT_STAR |
| 33 |
from performance_schema.events_statements_summary_by_account_by_event_name |
| 34 |
where HOST = "impossible" |
| 35 |
and USER = "impossible"; |
| 36 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 37 |
1 SIMPLE events_statements_summary_by_account_by_event_name NULL ref ACCOUNT ACCOUNT 385 const,const # 100.00 NULL |
| 38 |
############ Explain for Query #################################### |
| 39 |
explain select COUNT_STAR |
| 40 |
from performance_schema.events_statements_summary_by_account_by_event_name |
| 41 |
where HOST = "localhost" |
| 42 |
and USER = "impossible"; |
| 43 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 44 |
1 SIMPLE events_statements_summary_by_account_by_event_name NULL ref ACCOUNT ACCOUNT 385 const,const # 100.00 NULL |
| 45 |
############ Explain for Query #################################### |
| 46 |
explain select COUNT_STAR |
| 47 |
from performance_schema.events_statements_summary_by_account_by_event_name |
| 48 |
where HOST = "localhost" |
| 49 |
and USER > "impossible"; |
| 50 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 51 |
1 SIMPLE events_statements_summary_by_account_by_event_name NULL ALL ACCOUNT NULL NULL NULL # 3.33 Using where |
| 52 |
############ Explain for Query #################################### |
| 53 |
explain select COUNT_STAR |
| 54 |
from performance_schema.events_statements_summary_by_account_by_event_name |
| 55 |
where HOST = "localhost" |
| 56 |
and USER < "2"; |
| 57 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 58 |
1 SIMPLE events_statements_summary_by_account_by_event_name NULL ALL ACCOUNT NULL NULL NULL # 3.33 Using where |
| 59 |
############ Explain for Query #################################### |
| 60 |
explain select COUNT_STAR |
| 61 |
from performance_schema.events_statements_summary_by_account_by_event_name |
| 62 |
where HOST = "localhost" |
| 63 |
and USER = "foo"; |
| 64 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 65 |
1 SIMPLE events_statements_summary_by_account_by_event_name NULL ref ACCOUNT ACCOUNT 385 const,const # 100.00 NULL |
| 66 |
############ Explain for Query #################################### |
| 67 |
explain select COUNT_STAR |
| 68 |
from performance_schema.events_statements_summary_by_account_by_event_name |
| 69 |
where HOST = "impossible" |
| 70 |
and USER = "impossible" |
| 71 |
and EVENT_NAME = "impossible"; |
| 72 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 73 |
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL # NULL no matching row in const table |
| 74 |
############ Explain for Query #################################### |
| 75 |
explain select COUNT_STAR |
| 76 |
from performance_schema.events_statements_summary_by_account_by_event_name |
| 77 |
where HOST = "localhost" |
| 78 |
and USER = "foo" |
| 79 |
and EVENT_NAME = "impossible"; |
| 80 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 81 |
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL # NULL no matching row in const table |
| 82 |
############ Explain for Query #################################### |
| 83 |
explain select COUNT_STAR |
| 84 |
from performance_schema.events_statements_summary_by_account_by_event_name |
| 85 |
where HOST = "localhost" |
| 86 |
and USER = "foo" |
| 87 |
and EVENT_NAME > "impossible"; |
| 88 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 89 |
1 SIMPLE events_statements_summary_by_account_by_event_name NULL ref ACCOUNT ACCOUNT 385 const,const # 33.33 Using where |
| 90 |
############ Explain for Query #################################### |
| 91 |
explain select COUNT_STAR |
| 92 |
from performance_schema.events_statements_summary_by_account_by_event_name |
| 93 |
where HOST = "localhost" |
| 94 |
and USER = "foo" |
| 95 |
and EVENT_NAME < "2"; |
| 96 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 97 |
1 SIMPLE events_statements_summary_by_account_by_event_name NULL ref ACCOUNT ACCOUNT 385 const,const # 33.33 Using where |
| 98 |
############ Explain for Query #################################### |
| 99 |
explain select COUNT_STAR |
| 100 |
from performance_schema.events_statements_summary_by_account_by_event_name |
| 101 |
where HOST = "localhost" |
| 102 |
and USER = "foo" |
| 103 |
and EVENT_NAME = "statement/sql/select"; |
| 104 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 105 |
1 SIMPLE events_statements_summary_by_account_by_event_name NULL const ACCOUNT ACCOUNT 899 const,const,const # 100.00 NULL |
| 106 |
############# Explain End ######################################### |
| 107 |
flush status; |
| 108 |
select COUNT_STAR |
| 109 |
from performance_schema.events_statements_summary_by_account_by_event_name |
| 110 |
where HOST = "localhost" |
| 111 |
and USER = "foo" |
| 112 |
and EVENT_NAME = "statement/sql/select"; |
| 113 |
COUNT_STAR |
| 114 |
# |
| 115 |
OK: handler_read_key incremented |
| 116 |
drop user foo@localhost; |