SHOW STATUS
Sintassi
SHOW [GLOBAL | SESSION] STATUS [LIKE 'pattern' | WHERE espr]
Spiegazione
SHOW STATUS
restituisce informazioni sullo stato del server. Queste informazioni si possono ottenere anche con il comando mysqladmin extended-status. La clausola LIKE
, se presente, indica restituisce solo le variabili i cui nomi corrispondono al pattern. La clausola WHERE
può essere usata per specificare condizioni più generiche, come spiegato in
http://dev.mysql.com/doc/refman/5.1/en/extended-show.html.
MariaDB [test]> SHOW STATUS LIKE 'Key%'; +------------------------+--------+ | Variable_name | Value | +------------------------+--------+ | Key_blocks_not_flushed | 0 | | Key_blocks_unused | 115973 | | Key_blocks_used | 7 | | Key_read_requests | 19 | | Key_reads | 5 | | Key_write_requests | 2 | | Key_writes | 2 | +------------------------+--------+
With the GLOBAL
modifier, SHOW STATUS
displays the status values for all connections to MariaDB. With
SESSION
, it displays the status values
for the current connection. If no modifier is present, the default is
SESSION
. LOCAL
is a synonym for
SESSION
.
Some status variables have only a global value. For these, you get the
same value for both GLOBAL
and SESSION
.
The scope for each status variable is listed at
http://dev.mysql.com/doc/refman/5.1/en/server-status-variables.html.