Book Image

Mastering MariaDB

By : Federico Razzoli
Book Image

Mastering MariaDB

By: Federico Razzoli

Overview of this book

Table of Contents (19 chapters)
Mastering MariaDB
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Per-session buffers


MariaDB has several per-session buffers that speed up some queries. If these values are too small, some complex queries may start to take too much time. However, if they are too big and many concurrent connections are established, a big amount of memory could be wasted. The DBA should know the main per-session buffers and keep them reasonably small (but still big enough for the workload).

When an application opens a connection, it should approximately know which kinds of statements it will issue. It is possible that the application establishes different connections for different tasks; for example, this is what web applications usually do. So, it is not uncommon that most connections execute simple queries, while others perform more complex tasks, and thus they need more resources.

Per-session buffers can be configured on a per-session basis: a connection can change the size of some buffers without affecting other connections. This allows the allocation of bigger buffers...