O'Reilly logo

MariaDB High Performance by Pierre MAVRO

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The query cache

The query cache stores the results of the previously executed select statements so that they may be reused if the same query is issued again. If data is updated/added to a table, the query cache is flushed, and the data should be retrieved once again from the disk on the next SELECT query.

When there are too many concurrencies, the query cache could be a bottleneck. Depending on the size of the database and the requested access, here are two scenarios:

  • Smaller database, no high load traffic, no money: The query cache should help you to get fast database access
  • Huge database, high load traffic, money: Disable the query cache, optimize your indexes, spread the read load across several read-only replicas, and use a better caching mechanism, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required