Monitoring connections
The
SHOW PROCESSLIST
statement returns information about the active connections. The PROCESSLIST
table in the information_schema
database contains additional complete information; we will discuss this. Also, the threads
table in the performance_schema
database includes the same information returned by SHOW PROCESSLIST
, plus some extra columns. Normally, SHOW PROCESSLIST
returns sufficient information and is less verbose. The PROCESSLIST
table has the advantage that its contents can be used in a stored program.
The following example shows the contents of the PROCESSLIST
table and the output of SHOW PROCESSLIST
:
MariaDB [(none)]> SELECT * FROM information_schema.PROCESSLIST \G *************************** 1. row *************************** ...
Get Mastering MariaDB now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.