Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 38.0Mb
PDF (A4) - 38.1Mb
PDF (RPM) - 36.9Mb
HTML Download (TGZ) - 10.0Mb
HTML Download (Zip) - 10.1Mb
HTML Download (RPM) - 8.8Mb
Man Pages (TGZ) - 206.4Kb
Man Pages (Zip) - 314.7Kb
Info (Gzip) - 3.5Mb
Info (Zip) - 3.5Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  /  ...  /  Query Cache SELECT Options Query Cache SELECT Options


The query cache is deprecated as of MySQL 5.7.20, and is removed in MySQL 8.0.

Two query cache-related options may be specified in SELECT statements:


    The query result is cached if it is cacheable and the value of the query_cache_type system variable is ON or DEMAND.


    The server does not use the query cache. It neither checks the query cache to see whether the result is already cached, nor does it cache the query result.


SELECT SQL_CACHE id, name FROM customer;
SELECT SQL_NO_CACHE id, name FROM customer;

User Comments
Sign Up Login You must be logged in to post a comment.