SHOW STATUS
SHOW STATUS
Syntax:
SHOW [GLOBAL | SESSION] STATUS [LIKE ‘pattern’]
SHOW STATUS provides server status information. This information also can be obtained using the mysqladmin extended-status command.
With a LIKE clause, the statement displays only rows for those variables with names that match the pattern:
Example:
SHOW STATUS LIKE ‘open%’;
+—————+——-+
| Variable_name | Value |
+—————+——-+
| Open_files | 374 |
| Open_streams | 0 |
| Open_tables | 298 |
| Opened_tables | 0 |
+—————+——-+
4 rows in set (0.00 sec)
The GLOBAL and SESSION options are new in MySQL 5.0.2. With the GLOBAL modifier, SHOW STATUS displays the status values
for all connections to MySQL. 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.
