Enabling the performance schema
The performance schema is a tool that we can use to monitor our server performance. It is disabled by default, but it can easily be enabled.
How to do it...
Open our
my.cnf
ormy.ini
file and add the following code to the[mysqld]
section:performance_schema
Restart MariaDB.
Connect to MariaDB using the
mysql
command-line client.Run the
SHOW ENGINES;
command and verify thatPERFORMANCE_SCHEMA
is listed. The performance schema entry will look similar to the following screenshot:Switch to the
performance_schema
database using the following command:USE performance_schema;
Show the performance schema tables using the following command:
SHOW TABLES;
How it works...
The performance schema is implemented as a storage engine. This is why it shows up alongside other storage engines when we use the SHOW ENGINES;
command. However, it is not a storage engine for storing data. The purpose of the performance schema is to help us monitor server performance and when it is enabled...