I was wondering could I turn on the query_cache_type for mysql galera cluster of two nodes.

The scenario is : 1. Proxysql infront of two master-master galera(mysql) nodes 2. Inserts are coming through the proxysql 3. On the node2 I have a local PHP application, which is used for generating reports (many selects). There I would like to use the query cache. As far as I know query_cache should be disabled for galera cluster if you are using loadbalancing. At this particular case the selects are made directly on one of the nodes.

What is your opinion on the matter?

P.S. Or should I look for memcached instead....

  • why not use ProxySQL for caching, there are blogs about how to set up ProxySQL for caching Nov 19, 2018 at 1:24

1 Answer 1


No Query Cache on Galera Cluster. It is much to complex to keep it in sync among the nodes.

Instead, depend on the buffer_pool, etc, to make the queries "fast enough".

In 95+% of Production systems, the Query Cache (or any other caching) is a waste. Why? Because data is flowing in so fast that the cache must be all-too-frequently purged.

Perhaps your application is mostly read-only? That might be a justification for a read cache.

Perhaps your read queries are so slow that you have turned to caching as a 'fix'. Instead, let's look at the queries. Often, there is a simple solution (such as a composite index) to speed up reads to the point where caching is unnecessary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.