Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
MariaDB High Performance

You're reading from   MariaDB High Performance Familiarize yourself with the MariaDB system and build high-performance applications

Arrow left icon
Product type Paperback
Published in Sep 2014
Publisher
ISBN-13 9781783981601
Length 298 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Pierre Mavro Pierre Mavro
Author Profile Icon Pierre Mavro
Pierre Mavro
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Performance Introduction FREE CHAPTER 2. Performance Analysis 3. Performance Optimizations 4. MariaDB Replication 5. WAN Slave Architectures 6. Building a Dual Master Replication 7. MariaDB Multimaster Slaves 8. Galera Cluster – Multimaster Replication 9. Spider – Sharding Your Data 10. Monitoring 11. Backups Index

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, such as Memcache/Redis

A lot of common rules exist, but that doesn't mean they should always be applied. If you do not encounter slowdown due to the query cache, it's fine! You can even tune it to make it faster.

Understanding the query cache...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime