【问题标题】:query cache doesn't work查询缓存不起作用
【发布时间】:2011-08-23 01:26:01
【问题描述】:

我开启了 query_cache,并为其分配了内存:

| query_cache_limit            | 1048576    |
| query_cache_min_res_unit     | 4096       |
| query_cache_size             | 16777216   |
| query_cache_type             | ON         |
| query_cache_wlock_invalidate | OFF        |

但是查询没有被缓存:

| Qcache_free_blocks             | 1        |
| Qcache_free_memory             | 16768400 |
| Qcache_hits                    | 0        |
| Qcache_inserts                 | 0        |
| Qcache_lowmem_prunes           | 0        |
| Qcache_not_cached              | 163      |
| Qcache_queries_in_cache        | 0        |
| Qcache_total_blocks            | 1        |

我使用 Innodb 作为存储引擎,没有事务。未缓存的示例查询:

select * from `feed-ts`.feeds where id < 10;

它只返回一行。

有什么想法吗?

【问题讨论】:

    标签: mysql


    【解决方案1】:

    a bug in MySQL

    查询缓存根本不用于查询数据库中带有连字符名称的 InnoDB 表(如 feed-ts)。

    Renaming”你的数据库似乎是目前唯一的解决方案。

    【讨论】:

    • 哦,一团糟:-S 谢谢
    • 该错误显然已从MySQL 5.6.9 修复。
    猜你喜欢
    • 1970-01-01
    • 2013-09-23
    • 1970-01-01
    • 1970-01-01
    • 2017-06-15
    • 2023-03-15
    • 2014-04-16
    • 2011-01-22
    • 1970-01-01
    相关资源
    最近更新 更多