| 1 |
create database explain_test_db; |
| 2 |
use explain_test_db; |
| 3 |
select 1; |
| 4 |
1 |
| 5 |
1 |
| 6 |
use test; |
| 7 |
|
| 8 |
==================================================================== |
| 9 |
Testing index for columns BUCKET_NUMBER |
| 10 |
==================================================================== |
| 11 |
############ Explain for Query #################################### |
| 12 |
explain select COUNT_BUCKET |
| 13 |
from performance_schema.events_statements_histogram_global |
| 14 |
where BUCKET_NUMBER = "impossible"; |
| 15 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 16 |
1 SIMPLE events_statements_histogram_global NULL const PRIMARY PRIMARY 4 const # 100.00 NULL |
| 17 |
############ Explain for Query #################################### |
| 18 |
explain select COUNT_BUCKET |
| 19 |
from performance_schema.events_statements_histogram_global |
| 20 |
where BUCKET_NUMBER > "impossible"; |
| 21 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 22 |
1 SIMPLE events_statements_histogram_global NULL ALL PRIMARY NULL NULL NULL # 33.33 Using where |
| 23 |
############ Explain for Query #################################### |
| 24 |
explain select COUNT_BUCKET |
| 25 |
from performance_schema.events_statements_histogram_global |
| 26 |
where BUCKET_NUMBER < "2"; |
| 27 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 28 |
1 SIMPLE events_statements_histogram_global NULL ALL PRIMARY NULL NULL NULL # 33.33 Using where |
| 29 |
############ Explain for Query #################################### |
| 30 |
explain select COUNT_BUCKET |
| 31 |
from performance_schema.events_statements_histogram_global |
| 32 |
where BUCKET_NUMBER = 12; |
| 33 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 34 |
1 SIMPLE events_statements_histogram_global NULL const PRIMARY PRIMARY 4 const # 100.00 NULL |
| 35 |
############# Explain End ######################################### |
| 36 |
flush status; |
| 37 |
select COUNT_BUCKET |
| 38 |
from performance_schema.events_statements_histogram_global |
| 39 |
where BUCKET_NUMBER = 12; |
| 40 |
COUNT_BUCKET |
| 41 |
# |
| 42 |
OK: handler_read_key incremented |
| 43 |
drop database explain_test_db; |