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

User statistics


Since MariaDB 5.2, a patch from Google, Percona, and other companies has been implemented, which permits you to view the user statistics, client statistics, index statistics (and usage), and table statistics.

You can activate it on the fly using the following command:

MariaDB [(none)]> SET GLOBAL userstat=1;

Alternatively, you can make it persistent in the MariaDB configuration (my.cnf) using the following code:

[mysqld]
userstat = 1

You now have access to the new FLUSH and SHOW commands:

MariaDB [(none)]> FLUSH TABLE_STATISTICS
MariaDB [(none)]> FLUSH INDEX_STATISTICS
MariaDB [(none)]> FLUSH USER_STATISTICS
MariaDB [(none)]> FLUSH CLIENT_STATISTICS
MariaDB [(none)]> SHOW CLIENT_STATISTICS
MariaDB [(none)]> SHOW USER_STATISTICS
MariaDB [(none)]> SHOW INDEX_STATISTICS
MariaDB [(none)]> SHOW TABLE_STATISTICS

Here is an example of what the user statistics look like:

MariaDB [(none)]> SHOW USER_STATISTICS\G;
*************************** 1. row *****...