Book Image

MariaDB High Performance

By : Pierre Mavro
Book Image

MariaDB High Performance

By: Pierre Mavro

Overview of this book

Table of Contents (18 chapters)
MariaDB High Performance
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Index


This chapter cannot end without discussing indexes. Entering into the details of indexes could be long drawn out and is out of the scope of this book. Anyway, we'll talk about them a bit and see what you should take care about.

Most of the time, indexes are the way to get very good query result performances. But if they are badly used, they could have an inverted effect.

Let's say your application makes a search on several columns. First of all, run an explain command on the desired query and see what the explanation recommends. Maybe it will recommend to add some specific indexes to the columns. Do not add too many indexes only on the most used columns, or you'll waste resources.

If your application uses small tables, indexes won't make performance better. Indexes are useful on large tables.

Engines

First, you have to know that there exist three kinds of index engines in the default MariaDB installation, as follows:

  • BTREE: This is the most commonly used index engine, which is used for...