Chapter 6. Caches

Table data and indexes are normally written on mass memories, such as disks, SSDs, or flash memories. However, accessing these media is a slow process; if the server has to do it too often, the input or output is probably the bottleneck. To avoid accessing disks, MariaDB and storage engines have several caches that a DBA should know about. The following topics will be covered in this chapter:

  • The InnoDB buffer pool and doublewrite buffer
  • The MyISAM key cache
  • The Aria page cache
  • The query and subquery cache
  • The table open cache
  • The main per-session buffers

Note

Before beginning our discussion on the caches, a warning is needed. Many authoritative resources, such as the MariaDB Knowledge Base or the MySQL manual, suggest dedicating a huge ...

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.