Discuss in Forum
Installing more memory into the machine enables to configure larger values for the cache server and buffer sizes. This enables it to keep data in memory for longer duration.
The have_query_cache system variable is used to check whether there is support for query cache. The mode ‘2’ tells cache only those queries that begin with SELECT SQL_CACHE.
The have_query_cache system variable is used to check whether there is support for query cache. The mode ‘0’ tells not to cache the query results or to retrieve the cached results.
In MySQL, in order to determine whether a server supports the query cache or not, the value of the ‘have_query_cache’ system variable is checked. It returns ‘YES’ if support is available.
A query is not cached if the query returns non deterministic results. For example, a query that uses the NOW() function returns different results over time. Therefore, it cannot be cached.