MySQL/MariaDB的查询缓存
MariaDB > select * from coc;+----+---------+----------+
| ID | ClassID | CourseID |
+----+---------+----------+
|1 | 1 | 2 |
|2 | 1 | 5 |
|3 | 2 | 2 |
|4 | 2 | 6 |
|5 | 3 | 1 |
|6 | 3 | 7 |
|7 | 4 | 5 |
|8 | 4 | 2 |
|9 | 5 | 1 |
| 10 | 5 | 9 |
| 11 | 6 | 3 |
| 12 | 6 | 4 |
| 13 | 7 | 4 |
| 14 | 7 | 3 |
+----+---------+----------+
14 rows in set (0.00 sec)
MariaDB > show global status like 'Qcache%';
+-------------------------+-----------+
| Variable_name | Value |
+-------------------------+-----------+
| Qcache_free_blocks | 1 |
| Qcache_free_memory | 134198384 |
| Qcache_hits | 0 |
| Qcache_inserts | 1 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 1 |
| Qcache_queries_in_cache | 1 |
| Qcache_total_blocks | 4 |
+-------------------------+-----------+
8 rows in set (0.00 sec)
MariaDB > select * from coc;
+----+---------+----------+
| ID | ClassID | CourseID |
+----+---------+----------+
|1 | 1 | 2 |
|2 | 1 | 5 |
|3 | 2 | 2 |
|4 | 2 | 6 |
|5 | 3 | 1 |
|6 | 3 | 7 |
|7 | 4 | 5 |
|8 | 4 | 2 |
|9 | 5 | 1 |
| 10 | 5 | 9 |
| 11 | 6 | 3 |
| 12 | 6 | 4 |
| 13 | 7 | 4 |
| 14 | 7 | 3 |
+----+---------+----------+
14 rows in set (0.00 sec)
MariaDB > show global status like 'Qcache%';
+-------------------------+-----------+
| Variable_name | Value |
+-------------------------+-----------+
| Qcache_free_blocks | 1 |
| Qcache_free_memory | 134198384 |
| Qcache_hits | 1 |
| Qcache_inserts | 1 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 1 |
| Qcache_queries_in_cache | 1 |
| Qcache_total_blocks | 4 |
+-------------------------+-----------+
8 rows in set (0.00 sec)
页:
[1]