Bobcares

Enable performance schema in MariaDB and Optimize your Database

by | Mar 15, 2020

Is your website database crashing frequently?

Take a look at how the “performance schema” feature in MariaDB helps to monitor the database and fix bad queries efficiently.

At Bobcares, we often receive requests to tweak database server settings as part of our Server Management Services.

Today, let us discuss how our Support Engineers do it easily for our customers.

 

When to use performance schema?

Performance Schema is a feature of database servers which was introduced in MariaDB from version 5.5. Once we enable the feature, it will store all performance-related data in the respective tables under it.

Thus it gives clear details on the status of the database server. This comes handy in troubleshooting the SQL queries.

The set of tables in the performance schema show up as:

enable_performance_schema_mariadb

Performance schema is an under-utilized tool for monitoring MySQL databases.

In short, it automatically records statistics about how the MariaDB server behavior. Thus, it helps to fix bad queries and add proper indexes.

 

The relevance of enabling performance schema in MariaDB servers

Moreover, enabling performance schema comes with benefits like:

  • It will not affect the underlying Mysql service.
  • We can troubleshoot Mysql’s bad queries more effectively.
  • It collects all the information in the tables, so we can query it easily.
  • Its statistics will get reset every time we restart the MariaDB server.

 

How we enable performance schema in MariaDB?

In MariaDB, performance schema would be OFF by default.

Recently, one of our customers approached us with a query. He had problems with the database server performance. He wanted to turn ON the performance schema to automatically record all bad queries on his MariaDB server.

Our Support Engineers followed the below steps to do it.

1. Firstly, we locate the MariaDB configuration file. In Linux/Unix, it is found at /etc/mysql/my.cnf. Similarly, in Windows, it will be at C:\INSTALLDIR\MariaDB 10.1\my.cnf, which resides in the MySQL install directory.

2. Then, we edit the configuration file. Here, the performance schema is OFF by default. We make the following change.

peformance_schema = ON

After that, we save this file.

3. Finally, we restart the MariaDB service.

So, this is how we enable the performance schema. Also, the performance schema’s statistics will get reset every time we restart the MariaDB server.

[Need more assistance to enable performance schema in MariaDB? – We are available 24/7 to help you.]

 

Conclusion

In short, we enable performance schema in MariaDB in order to record all performance parameters of the database server. In today’s writeup, we saw how our Support Engineers do it easily for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF