Invalidating query cache mysql
When query cache is used and a node goes into non-PRIM state, queries which returned results earlier (and cached into query cache) still return results whereas newer queries (or the ones not cached) return 'unknown command'.This inconsistent return of results should be prevented by invalidating query cache when a node becomes non-PRIM (or when wsrep_ready is OFF).cc' --- sql/wsrep_2014-04-20 +0000 +++ sql/wsrep_2014-04-20 +0000 @@ -230,6 +230,10 @@ /* Proceed further only if view is PRIMARY */ if (WSREP_VIEW_PRIMARY !
Optimization involves configuring, tuning, and measuring performance, at several levels.Advanced users look for opportunities to improve the My SQL software itself, or develop their own storage engines and hardware appliances to expand the My SQL ecosystem.The most important factor in making a database application fast is its basic design: Any database application eventually hits hardware limits as the database becomes more and more busy.A DBA must evaluate whether it is possible to tune the application or reconfigure the server to avoid these bottlenecks, or whether more hardware resources are required.These software constructs result in CPU and I/O operations at the hardware level, which you must minimize and make as efficient as possible.As you work on database performance, you start by learning the high-level rules and guidelines for the software side, and measuring performance using wall-clock time.
As you become an expert, you learn more about what happens internally, and start measuring things such as CPU cycles and I/O operations.
Typical users aim to get the best database performance out of their existing software and hardware configurations.
Depending on your job role (developer, DBA, or a combination of both), you might optimize at the level of individual SQL statements, entire applications, a single database server, or multiple networked database servers.
Sometimes you can be proactive and plan in advance for performance, while other times you might troubleshoot a configuration or code issue after a problem occurs.
Optimizing CPU and memory usage can also improve scalability, allowing the database to handle more load without slowing down.
Database performance depends on several factors at the database level, such as tables, queries, and configuration settings.