The query cache explained

The query cache stores the queries that have been executed against the server and their results. If a user issues a query that is in the cache, the results are returned immediately. Of course, the server still checks whether the account has the right to execute the query.

How the query cache affects the performance of a server strictly depends on the workload. In many cases, it may even cause a performance loss. It is enabled by default, but the DBA should carefully benchmark the applications with the query cache enabled and disabled to determine whether it is beneficial for the server. The tests should also be periodically repeated if the applications change. It is also possible to activate it on demand, that is, the ...

Get Mastering MariaDB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.