Server Status Variables
516
Variable Name
Variable Type
Variable Scope
timed_mutexes
[501]
boolean
GLOBAL
timestamp
[501]
numeric
SESSION
tmp_table_size
[501]
numeric
GLOBAL
|
SESSION
transaction_alloc_block_size
[502]
numeric
GLOBAL
|
SESSION
transaction_prealloc_size
[503]
numeric
GLOBAL
|
SESSION
tx_isolation
[504]
enumeration
GLOBAL
|
SESSION
unique_checks
[504]
boolean
SESSION
updatable_views_with_limit
[504]
boolean
GLOBAL
|
SESSION
wait_timeout
[506]
numeric
GLOBAL
|
SESSION
5.1.6. Server Status Variables
The server maintains many status variables that provide information about its operation. You can view
these variables and their values by using the
SHOW [GLOBAL | SESSION] STATUS
statement (see
Section 13.7.5.32, “
SHOW STATUS
Syntax”
). The optional
GLOBAL
keyword aggregates the values over
all connections, and
SESSION
shows the values for the current connection.
mysql>
SHOW GLOBAL STATUS;
+-----------------------------------+------------+
| Variable_name | Value |
+-----------------------------------+------------+
| Aborted_clients | 0 |
| Aborted_connects | 0 |
| Bytes_received | 155372598 |
| Bytes_sent | 1176560426 |
...
| Connections | 30023 |
| Created_tmp_disk_tables | 0 |
| Created_tmp_files | 3 |
| Created_tmp_tables | 2 |
...
| Threads_created | 217 |
| Threads_running | 88 |
| Uptime | 1389872 |
+-----------------------------------+------------+
Note
Before MySQL 5.0.2,
SHOW STATUS
returned global status values. Because the
default as of 5.0.2 is to return session values, this is incompatible with previous
versions. To issue a
SHOW STATUS
statement that will retrieve global status
values for all versions of MySQL, write it like this:
SHOW /*!50002 GLOBAL */ STATUS;
Many status variables are reset to 0 by the
FLUSH STATUS
statement.
The following table lists all available server status variables:
Table 5.4. Status Variable Summary
Variable Name
Variable Type
Variable Scope
Aborted_clients
[523]
numeric
GLOBAL
Aborted_connects
[523]
numeric
GLOBAL
Binlog_cache_disk_use
[523]
numeric
GLOBAL
Binlog_cache_use
[523]
numeric
GLOBAL
Bytes_received
[523]
numeric
GLOBAL
|
SESSION
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...