| 1 |
set @save_query_cache_size=@@query_cache_size; |
| 2 |
drop table if exists t1; |
| 3 |
create table t1 (a int not null); |
| 4 |
insert into t1 values (1), (2), (3); |
| 5 |
SET GLOBAL query_cache_size=1355776; |
| 6 |
flush query cache; |
| 7 |
reset query cache; |
| 8 |
flush global status; |
| 9 |
select * from t1; |
| 10 |
a |
| 11 |
1 |
| 12 |
2 |
| 13 |
3 |
| 14 |
show global status like "Qcache_queries_in_cache"; |
| 15 |
Variable_name Value |
| 16 |
Qcache_queries_in_cache 1 |
| 17 |
show global status like "Qcache_inserts"; |
| 18 |
Variable_name Value |
| 19 |
Qcache_inserts 1 |
| 20 |
show global status like "Qcache_hits"; |
| 21 |
Variable_name Value |
| 22 |
Qcache_hits 0 |
| 23 |
select * from t1; |
| 24 |
a |
| 25 |
1 |
| 26 |
2 |
| 27 |
3 |
| 28 |
show global status like "Qcache_queries_in_cache"; |
| 29 |
Variable_name Value |
| 30 |
Qcache_queries_in_cache 1 |
| 31 |
show global status like "Qcache_inserts"; |
| 32 |
Variable_name Value |
| 33 |
Qcache_inserts 1 |
| 34 |
show global status like "Qcache_hits"; |
| 35 |
Variable_name Value |
| 36 |
Qcache_hits 1 |
| 37 |
select spins from performance_schema.events_waits_current order by event_name limit 1; |
| 38 |
spins |
| 39 |
NULL |
| 40 |
select * from performance_schema.setup_timers where name='wait'; |
| 41 |
NAME TIMER_NAME |
| 42 |
wait {CYCLE_OR_NANOSECOND} |
| 43 |
Warnings: |
| 44 |
Warning 1287 'performance_schema.setup_timers' is deprecated and will be removed in a future release |
| 45 |
show global status like "Qcache_queries_in_cache"; |
| 46 |
Variable_name Value |
| 47 |
Qcache_queries_in_cache 1 |
| 48 |
show global status like "Qcache_inserts"; |
| 49 |
Variable_name Value |
| 50 |
Qcache_inserts 1 |
| 51 |
show global status like "Qcache_hits"; |
| 52 |
Variable_name Value |
| 53 |
Qcache_hits 1 |
| 54 |
select spins from performance_schema.events_waits_current order by event_name limit 1; |
| 55 |
spins |
| 56 |
NULL |
| 57 |
select * from performance_schema.setup_timers where name='wait'; |
| 58 |
NAME TIMER_NAME |
| 59 |
wait {CYCLE_OR_NANOSECOND} |
| 60 |
Warnings: |
| 61 |
Warning 1287 'performance_schema.setup_timers' is deprecated and will be removed in a future release |
| 62 |
show global status like "Qcache_queries_in_cache"; |
| 63 |
Variable_name Value |
| 64 |
Qcache_queries_in_cache 1 |
| 65 |
show global status like "Qcache_inserts"; |
| 66 |
Variable_name Value |
| 67 |
Qcache_inserts 1 |
| 68 |
show global status like "Qcache_hits"; |
| 69 |
Variable_name Value |
| 70 |
Qcache_hits 1 |
| 71 |
SET GLOBAL query_cache_size=@save_query_cache_size; |
| 72 |
drop table t1; |
| 73 |
flush global status; |