Bug #69396 | Can't set query_cache_type to 0 when it is already 0 | ||
---|---|---|---|
Submitted: | 4 Jun 2013 12:08 | Modified: | 23 Nov 2014 15:31 |
Reporter: | Rolf Neuberger | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Query Cache | Severity: | S3 (Non-critical) |
Version: | 5.6.11, 5.5.31 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | 1651, Dynamic System Variable, query cache |
[4 Jun 2013 12:08]
Rolf Neuberger
[4 Jun 2013 13:25]
MySQL Verification Team
Hello Rolf, Thank you for the report. Verified as described. Thanks, Umesh
[16 Jul 2013 17:32]
Paul DuBois
Noted in 5.7.2 changelog. If query_cache_type was disabled at startup to prevent the query cache from being enabled at runtime, disabling query_cache_type at runtime generated a warning even though it was already disabled.
[23 Nov 2014 7:10]
Jonathan DeLanders
why in ever gods name would anyone ever to choose to disable enabling query cache at runtime? seriously. WTF.
[23 Nov 2014 7:28]
Jonathan DeLanders
use postgres.
[23 Nov 2014 15:31]
Rolf Neuberger
Jonathan, you disable query cache if you aniticpate your session will generate a lot of cachable queries that generally not going to be reissued verbatim any time soon (or ever), "polluting" the cache with low-value entries, while throwing out more valuable ones. There are also still significant overheads involved in MySQL caching that can slow down sessions issuing a large number of queries involving very small result sets. The reason for the report is that the original behaviour added extra non-obvious boilerplate requirements to client processes that want to disable the query cache. If I wanted to use the same script to perform operations across several MySQL server installations, for which I determined (through benchmarking or otherwise) that I'm better off without query cache, I had to check the runtime configuration after establishing the connection just to determine if cache steering (SET query_cache_type or SELECT SQL_NO_CACHE) was safe to use.