Monitor server execution. Profiling queries.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Wed, 30 Dec 2015 01:20:37 +0200
changeset 1850 84707c692266
parent 1849 a3b639d803e7
child 1851 e6ffc5f7200e
Monitor server execution. Profiling queries.
mysql.rst
--- a/mysql.rst	Tue Dec 29 22:38:28 2015 +0200
+++ b/mysql.rst	Wed Dec 30 01:20:37 2015 +0200
@@ -63,8 +63,8 @@
 
   [mysql]> SHOW VARIABLES LIKE "%version%";
 
-Debugging.
-==========
+Debugging queries error.
+========================
 
 After error or warning run::
 
@@ -72,3 +72,26 @@
   MariaDB [mysql]> SHOW ERRORS;
   MariaDB [mysql]> show engine innodb status;
 
+Monitor server execution.
+=========================
+::
+
+  MariaDB [mysql]> SHOW PROCESSLIST;
+
+Profiling queries.
+==================
+
+Enable profiling, execute query and review profiling data::
+
+  [mysql]> set profiling=1;
+  [mysql]> select 1;
+  [mysql]> show profile;
+
+Each profiled query results stored separately. To get list of results::
+
+  [mysql]> show profiles;
+
+To retrieve selected profiling data::
+
+  [mysql]> show profile for query 1;
+