Query Monitoring

You are viewing an old version of this article. View the current version here.

Active SQL Statement

show processlist

MariaDB show processlist command may be used to see list of active queries

MariaDB [test]> show processlist;
| Id | User | Host | db | Command | Time | State | Info |
| 73 | root | localhost | ssb10 | Query | 0 | NULL | show processlist
1 row in set (0.01 sec)


getActiveSQLStatements is a mcsdmin command that shows what SQL is currently being executed on the database:

mcsadmin> getActiveSQLStatements
getactivesqlstatements Wed Oct 7 08:38:32 2015
Get List of Active SQL Statements
Start Time    Time (hh:mm:ss) Session ID SQL Statement
---------------- ---------------- -------------------- ------------------------------------------------------------
Oct 7 08:38:30    00:00:03       73 select c_name,sum(lo_revenue) from customer, lineorder where lo_custkey = c_custkey and c_custkey = 6 group by c_name

Single Query Statistics calgetstats/calsetstats

Query Plan calgettrace/calsettrace

Query History


Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.