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 , "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 |
+-----------------------------------+------------+
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
| numeric | GLOBAL
|
Aborted_connects
| numeric | GLOBAL
|
Binlog_cache_disk_use
| numeric | GLOBAL
|
Binlog_cache_use
| numeric | GLOBAL
|
binlog_rows_query_log_events
| boolean | GLOBAL | SESSION
|
Binlog_stmt_cache_disk_use
| numeric | GLOBAL
|
Binlog_stmt_cache_use
| numeric | GLOBAL
|
Bytes_received
| numeric | GLOBAL | SESSION
|
Bytes_sent
| numeric | GLOBAL | SESSION
|
Com_admin_commands
| numeric | GLOBAL | SESSION
|
Com_alter_db
| numeric | GLOBAL | SESSION
|
Com_alter_db_upgrade
| numeric | GLOBAL | SESSION
|
Com_alter_event
| numeric | GLOBAL | SESSION
|
Com_alter_function
| numeric | GLOBAL | SESSION
|
Com_alter_procedure
| numeric | GLOBAL | SESSION
|
Com_alter_server
| numeric | GLOBAL | SESSION
|
Com_alter_table
| numeric | GLOBAL | SESSION
|
Com_alter_tablespace
| numeric | GLOBAL | SESSION
|
Com_analyze
| numeric | GLOBAL | SESSION
|
Com_assign_to_keycache
| numeric | GLOBAL | SESSION
|
Com_begin
| numeric | GLOBAL | SESSION
|
Com_binlog
| numeric | GLOBAL | SESSION
|
Com_call_procedure
| numeric | GLOBAL | SESSION
|
Com_change_db
| numeric | GLOBAL | SESSION
|
Com_change_master
| numeric | GLOBAL | SESSION
|
Com_check
| numeric | GLOBAL | SESSION
|
Com_checksum
| numeric | GLOBAL | SESSION
|
Com_commit
| numeric | GLOBAL | SESSION
|
Com_create_db
| numeric | GLOBAL | SESSION
|
Com_create_event
| numeric | GLOBAL | SESSION
|
Com_create_function
| numeric | GLOBAL | SESSION
|
Com_create_index
| numeric | GLOBAL | SESSION
|
Com_create_procedure
| numeric | GLOBAL | SESSION
|
Com_create_server
| numeric | GLOBAL | SESSION
|
Com_create_table
| numeric | GLOBAL | SESSION
|
Com_create_trigger
| numeric | GLOBAL | SESSION
|
Com_create_udf
| numeric | GLOBAL | SESSION
|
Com_create_user
| numeric | GLOBAL | SESSION
|
Com_create_view
| numeric | GLOBAL | SESSION
|
Com_dealloc_sql
| numeric | GLOBAL | SESSION
|
Com_delete
| numeric | GLOBAL | SESSION
|
Com_delete_multi
| numeric | GLOBAL | SESSION
|
Com_do
| numeric | GLOBAL | SESSION
|
Com_drop_db
| numeric | GLOBAL | SESSION
|
Com_drop_event
| numeric | GLOBAL | SESSION
|
Com_drop_function
| numeric | GLOBAL | SESSION
|
Com_drop_index
| numeric | GLOBAL | SESSION
|
Com_drop_procedure
| numeric | GLOBAL | SESSION
|
Com_drop_server
| numeric | GLOBAL | SESSION
|
Com_drop_table
| numeric | GLOBAL | SESSION
|
Com_drop_trigger
| numeric | GLOBAL | SESSION
|
Com_drop_user
| numeric | GLOBAL | SESSION
|
Com_drop_view
| numeric | GLOBAL | SESSION
|
Com_empty_query
| numeric | GLOBAL | SESSION
|
Com_execute_sql
| numeric | GLOBAL | SESSION
|
Com_flush
| numeric | GLOBAL | SESSION
|
Com_grant
| numeric | GLOBAL | SESSION
|
Com_ha_close
| numeric | GLOBAL | SESSION
|
Com_ha_open
| numeric | GLOBAL | SESSION
|
Com_ha_read
| numeric | GLOBAL | SESSION
|
Com_help
| numeric | GLOBAL | SESSION
|
Com_insert
| numeric | GLOBAL | SESSION
|
Com_insert_select
| numeric | GLOBAL | SESSION
|
Com_install_plugin
| numeric | GLOBAL | SESSION
|
Com_kill
| numeric | GLOBAL | SESSION
|
Com_load
| numeric | GLOBAL | SESSION
|
Com_lock_tables
| numeric | GLOBAL | SESSION
|
Com_optimize
| numeric | GLOBAL | SESSION
|
Com_preload_keys
| numeric | GLOBAL | SESSION
|
Com_prepare_sql
| numeric | GLOBAL | SESSION
|
Com_purge
| numeric | GLOBAL | SESSION
|
Com_purge_before_date
| numeric | GLOBAL | SESSION
|
Com_release_savepoint
| numeric | GLOBAL | SESSION
|
Com_rename_table
| numeric | GLOBAL | SESSION
|
Com_rename_user
| numeric | GLOBAL | SESSION
|
Com_repair
| numeric | GLOBAL | SESSION
|
Com_replace
| numeric | GLOBAL | SESSION
|
Com_replace_select
| numeric | GLOBAL | SESSION
|
Com_reset
| numeric | GLOBAL | SESSION
|
Com_resignal
| numeric | GLOBAL | SESSION
|
Com_revoke
| numeric | GLOBAL | SESSION
|
Com_revoke_all
| numeric | GLOBAL | SESSION
|
Com_rollback
| numeric | GLOBAL | SESSION
|
Com_rollback_to_savepoint
| numeric | GLOBAL | SESSION
|
Com_savepoint
| numeric | GLOBAL | SESSION
|
Com_select
| numeric | GLOBAL | SESSION
|
Com_set_option
| numeric | GLOBAL | SESSION
|
Com_show_authors
| numeric | GLOBAL | SESSION
|
Com_show_binlog_events
| numeric | GLOBAL | SESSION
|
Com_show_binlogs
| numeric | GLOBAL | SESSION
|
Com_show_charsets
| numeric | GLOBAL | SESSION
|
Com_show_collations
| numeric | GLOBAL | SESSION
|
Com_show_contributors
| numeric | GLOBAL | SESSION
|
Com_show_create_db
| numeric | GLOBAL | SESSION
|
Com_show_create_event
| numeric | GLOBAL | SESSION
|
Com_show_create_func
| numeric | GLOBAL | SESSION
|
Com_show_create_proc
| numeric | GLOBAL | SESSION
|
Com_show_create_table
| numeric | GLOBAL | SESSION
|
Com_show_create_trigger
| numeric | GLOBAL | SESSION
|
Com_show_databases
| numeric | GLOBAL | SESSION
|
Com_show_engine_logs
| numeric | GLOBAL | SESSION
|
Com_show_engine_mutex
| numeric | GLOBAL | SESSION
|
Com_show_engine_status
| numeric | GLOBAL | SESSION
|
Com_show_errors
| numeric | GLOBAL | SESSION
|
Com_show_events
| numeric | GLOBAL | SESSION
|
Com_show_fields
| numeric | GLOBAL | SESSION
|
Com_show_function_code
| numeric | GLOBAL | SESSION
|
Com_show_function_status
| numeric | GLOBAL | SESSION
|
Com_show_grants
| numeric | GLOBAL | SESSION
|
Com_show_keys
| numeric | GLOBAL | SESSION
|
Com_show_logs
| numeric | GLOBAL | SESSION
|
Com_show_master_status
| numeric | GLOBAL | SESSION
|
Com_show_new_master
| numeric | GLOBAL | SESSION
|
Com_show_open_tables
| numeric | GLOBAL | SESSION
|
Com_show_plugins
| numeric | GLOBAL | SESSION
|
Com_show_privileges
| numeric | GLOBAL | SESSION
|
Com_show_procedure_code
| numeric | GLOBAL | SESSION
|
Com_show_procedure_status
| numeric | GLOBAL | SESSION
|
Com_show_processlist
| numeric | GLOBAL | SESSION
|
Com_show_profile
| numeric | GLOBAL | SESSION
|
Com_show_profiles
| numeric | GLOBAL | SESSION
|
Com_show_relaylog_events
| numeric | GLOBAL | SESSION
|
Com_show_slave_hosts
| numeric | GLOBAL | SESSION
|
Com_show_slave_status
| numeric | GLOBAL | SESSION
|
Com_show_status
| numeric | GLOBAL | SESSION
|
Com_show_storage_engines
| numeric | GLOBAL | SESSION
|
Com_show_table_status
| numeric | GLOBAL | SESSION
|
Com_show_tables
| numeric | GLOBAL | SESSION
|
Com_show_triggers
| numeric | GLOBAL | SESSION
|
Com_show_variables
| numeric | GLOBAL | SESSION
|
Com_show_warnings
| numeric | GLOBAL | SESSION
|
Com_signal
| numeric | GLOBAL | SESSION
|
Com_slave_start
| numeric | GLOBAL | SESSION
|
Com_slave_stop
| numeric | GLOBAL | SESSION
|
Com_stmt_close
| numeric | GLOBAL | SESSION
|
Com_stmt_execute
| numeric | GLOBAL | SESSION
|
Com_stmt_fetch
| numeric | GLOBAL | SESSION
|
Com_stmt_prepare
| numeric | GLOBAL | SESSION
|
Com_stmt_reprepare
| numeric | GLOBAL | SESSION
|
Com_stmt_reset
| numeric | GLOBAL | SESSION
|
Com_stmt_send_long_data
| numeric | GLOBAL | SESSION
|
Com_truncate
| numeric | GLOBAL | SESSION
|
Com_uninstall_plugin
| numeric | GLOBAL | SESSION
|
Com_unlock_tables
| numeric | GLOBAL | SESSION
|
Com_update
| numeric | GLOBAL | SESSION
|
Com_update_multi
| numeric | GLOBAL | SESSION
|
Com_xa_commit
| numeric | GLOBAL | SESSION
|
Com_xa_end
| numeric | GLOBAL | SESSION
|
Com_xa_prepare
| numeric | GLOBAL | SESSION
|
Com_xa_recover
| numeric | GLOBAL | SESSION
|
Com_xa_rollback
| numeric | GLOBAL | SESSION
|
Com_xa_start
| numeric | GLOBAL | SESSION
|
Compression
| numeric | SESSION
|
Connection_errors_accept
| numeric | GLOBAL
|
Connection_errors_internal
| numeric | GLOBAL
|
Connection_errors_max_connections
| numeric | GLOBAL
|
Connection_errors_peer_addr
| numeric | GLOBAL
|
Connection_errors_select
| numeric | GLOBAL
|
Connection_errors_tcpwrap
| numeric | GLOBAL
|
Connections
| numeric | GLOBAL
|
Created_tmp_disk_tables
| numeric | GLOBAL | SESSION
|
Created_tmp_files
| numeric | GLOBAL
|
Created_tmp_tables
| numeric | GLOBAL | SESSION
|
Delayed_errors
| numeric | GLOBAL
|
Delayed_insert_threads
| numeric | GLOBAL
|
Delayed_writes
| numeric | GLOBAL
|
Flush_commands
| numeric | GLOBAL
|
Handler_commit
| numeric | GLOBAL | SESSION
|
Handler_delete
| numeric | GLOBAL | SESSION
|
Handler_discover
| numeric | GLOBAL | SESSION
|
Handler_external_lock
| numeric | GLOBAL | SESSION
|
Handler_prepare
| numeric | GLOBAL | SESSION
|
Handler_read_first
| numeric | GLOBAL | SESSION
|
Handler_read_key
| numeric | GLOBAL | SESSION
|
Handler_read_last
| numeric | GLOBAL | SESSION
|
Handler_read_next
| numeric | GLOBAL | SESSION
|
Handler_read_prev
| numeric | GLOBAL | SESSION
|
Handler_read_rnd
| numeric | GLOBAL | SESSION
|
Handler_read_rnd_next
| numeric | GLOBAL | SESSION
|
Handler_rollback
| numeric | GLOBAL | SESSION
|
Handler_savepoint
| numeric | GLOBAL | SESSION
|
Handler_savepoint_rollback
| numeric | GLOBAL | SESSION
|
Handler_update
| numeric | GLOBAL | SESSION
|
Handler_write
| numeric | GLOBAL | SESSION
|
Innodb_buffer_pool_dump_status
| numeric | GLOBAL
|
Innodb_buffer_pool_load_status
| numeric | GLOBAL
|
Innodb_buffer_pool_pages_data
| numeric | GLOBAL
|
Innodb_buffer_pool_pages_dirty
| numeric | GLOBAL
|
Innodb_buffer_pool_pages_flushed
| numeric | GLOBAL
|
Innodb_buffer_pool_pages_free
| numeric | GLOBAL
|
Innodb_buffer_pool_pages_latched
| numeric | GLOBAL
|
Innodb_buffer_pool_pages_misc
| numeric | GLOBAL
|
Innodb_buffer_pool_pages_total
| numeric | GLOBAL
|
Innodb_buffer_pool_read_ahead
| numeric | GLOBAL
|
Innodb_buffer_pool_read_ahead_evicted
| numeric | GLOBAL
|
Innodb_buffer_pool_read_requests
| numeric | GLOBAL
|
Innodb_buffer_pool_reads
| numeric | GLOBAL
|
Innodb_buffer_pool_wait_free
| numeric | GLOBAL
|
Innodb_buffer_pool_write_requests
| numeric | GLOBAL
|
Innodb_data_fsyncs
| numeric | GLOBAL
|
Innodb_data_pending_fsyncs
| numeric | GLOBAL
|
Innodb_data_pending_reads
| numeric | GLOBAL
|
Innodb_data_pending_writes
| numeric | GLOBAL
|
Innodb_data_read
| numeric | GLOBAL
|
Innodb_data_reads
| numeric | GLOBAL
|
Innodb_data_writes
| numeric | GLOBAL
|
Innodb_data_written
| numeric | GLOBAL
|
Innodb_dblwr_pages_written
| numeric | GLOBAL
|
Innodb_dblwr_writes
| numeric | GLOBAL
|
Innodb_have_atomic_builtins
| numeric | GLOBAL
|
Innodb_log_waits
| numeric | GLOBAL
|
Innodb_log_write_requests
| numeric | GLOBAL
|
Innodb_log_writes
| numeric | GLOBAL
|
Innodb_num_open_files
| numeric | GLOBAL
|
Innodb_os_log_fsyncs
| numeric | GLOBAL
|
Innodb_os_log_pending_fsyncs
| numeric | GLOBAL
|
Innodb_os_log_pending_writes
| numeric | GLOBAL
|
Innodb_os_log_written
| numeric | GLOBAL
|
Innodb_page_size
| numeric | GLOBAL
|
Innodb_pages_created
| numeric | GLOBAL
|
Innodb_pages_read
| numeric | GLOBAL
|
Innodb_pages_written
| numeric | GLOBAL
|
Innodb_row_lock_current_waits
| numeric | GLOBAL
|
Innodb_row_lock_time
| numeric | GLOBAL
|
Innodb_row_lock_time_avg
| numeric | GLOBAL
|
Innodb_row_lock_time_max
| numeric | GLOBAL
|
Innodb_row_lock_waits
| numeric | GLOBAL
|
Innodb_rows_deleted
| numeric | GLOBAL
|
Innodb_rows_inserted
| numeric | GLOBAL
|
Innodb_rows_read
| numeric | GLOBAL
|
Innodb_rows_updated
| numeric | GLOBAL
|
Innodb_truncated_status_writes
| numeric | GLOBAL
|
Key_blocks_not_flushed
| numeric | GLOBAL
|
Key_blocks_unused
| numeric | GLOBAL
|
Key_blocks_used
| numeric | GLOBAL
|
Key_read_requests
| numeric | GLOBAL
|
Key_reads
| numeric | GLOBAL
|
Key_write_requests
| numeric | GLOBAL
|
Key_writes
| numeric | GLOBAL
|
Last_query_cost
| numeric | SESSION
|
Last_query_partial_plans
| numeric | SESSION
|
Max_used_connections
| numeric | GLOBAL
|
Ndb_conflict_fn_max
| numeric | GLOBAL
|
Ndb_conflict_fn_old
| numeric | GLOBAL
|
Ndb_number_of_data_nodes
| numeric | GLOBAL
|
Not_flushed_delayed_rows
| numeric | GLOBAL
|
Open_files
| numeric | GLOBAL
|
Open_streams
| numeric | GLOBAL
|
Open_table_definitions
| numeric | GLOBAL
|
Open_tables
| numeric | GLOBAL | SESSION
|
Opened_files
| numeric | GLOBAL
|
Opened_table_definitions
| numeric | GLOBAL | SESSION
|
Opened_tables
| numeric | GLOBAL | SESSION
|
Performance_schema_accounts_lost
| numeric | GLOBAL
|
Performance_schema_cond_classes_lost
| numeric | GLOBAL
|
Performance_schema_cond_instances_lost
| numeric | GLOBAL
|
Performance_schema_file_classes_lost
| numeric | GLOBAL
|
Performance_schema_file_handles_lost
| numeric | GLOBAL
|
Performance_schema_file_instances_lost
| numeric | GLOBAL
|
Performance_schema_hosts_lost
| numeric | GLOBAL
|
Performance_schema_locker_lost
| numeric | GLOBAL
|
Performance_schema_mutex_classes_lost
| numeric | GLOBAL
|
Performance_schema_mutex_instances_lost
| numeric | GLOBAL
|
Performance_schema_rwlock_classes_lost
| numeric | GLOBAL
|
Performance_schema_rwlock_instances_lost
| numeric | GLOBAL
|
Performance_schema_socket_classes_lost
| numeric | GLOBAL
|
Performance_schema_socket_instances_lost
| numeric | GLOBAL
|
Performance_schema_stage_classes_lost
| numeric | GLOBAL
|
Performance_schema_statement_classes_lost
| numeric | GLOBAL
|
Performance_schema_table_handles_lost
| numeric | GLOBAL
|
Performance_schema_table_instances_lost
| numeric | GLOBAL
|
Performance_schema_thread_classes_lost
| numeric | GLOBAL
|
Performance_schema_thread_instances_lost
| numeric | GLOBAL
|
Performance_schema_users_lost
| numeric | GLOBAL
|
Prepared_stmt_count
| numeric | GLOBAL
|
Qcache_free_blocks
| numeric | GLOBAL
|
Qcache_free_memory
| numeric | GLOBAL
|
Qcache_hits
| numeric | GLOBAL
|
Qcache_inserts
| numeric | GLOBAL
|
Qcache_lowmem_prunes
| numeric | GLOBAL
|
Qcache_not_cached
| numeric | GLOBAL
|
Qcache_queries_in_cache
| numeric | GLOBAL
|
Qcache_total_blocks
| numeric | GLOBAL
|
Queries
| numeric | GLOBAL | SESSION
|
Questions
| numeric | GLOBAL | SESSION
|
Rpl_semi_sync_master_clients
| numeric | GLOBAL
|
Rpl_semi_sync_master_net_avg_wait_time
| numeric | GLOBAL
|
Rpl_semi_sync_master_net_wait_time
| numeric | GLOBAL
|
Rpl_semi_sync_master_net_waits
| numeric | GLOBAL
|
Rpl_semi_sync_master_no_times
| numeric | GLOBAL
|
Rpl_semi_sync_master_no_tx
| numeric | GLOBAL
|
Rpl_semi_sync_master_status
| boolean | GLOBAL
|
Rpl_semi_sync_master_timefunc_failures
| numeric | GLOBAL
|
Rpl_semi_sync_master_tx_avg_wait_time
| numeric | GLOBAL
|
Rpl_semi_sync_master_tx_wait_time
| numeric | GLOBAL
|
Rpl_semi_sync_master_tx_waits
| numeric | GLOBAL
|
Rpl_semi_sync_master_wait_pos_backtraverse
| numeric | GLOBAL
|
Rpl_semi_sync_master_wait_sessions
| numeric | GLOBAL
|
Rpl_semi_sync_master_yes_tx
| numeric | GLOBAL
|
Rpl_semi_sync_slave_status
| boolean | GLOBAL
|
Select_full_join
| numeric | GLOBAL | SESSION
|
Select_full_range_join
| numeric | GLOBAL | SESSION
|
Select_range
| numeric | GLOBAL | SESSION
|
Select_range_check
| numeric | GLOBAL | SESSION
|
Select_scan
| numeric | GLOBAL | SESSION
|
Slave_heartbeat_period
| GLOBAL
| |
Slave_last_heartbeat
| GLOBAL
| |
Slave_open_temp_tables
| numeric | GLOBAL
|
Slave_received_heartbeats
| GLOBAL
| |
Slave_retried_transactions
| numeric | GLOBAL
|
Slave_running
| boolean | GLOBAL
|
Slow_launch_threads
| numeric | GLOBAL | SESSION
|
Slow_queries
| numeric | GLOBAL | SESSION
|
Sort_merge_passes
| numeric | GLOBAL | SESSION
|
Sort_range
| numeric | GLOBAL | SESSION
|
Sort_rows
| numeric | GLOBAL | SESSION
|
Sort_scan
| numeric | GLOBAL | SESSION
|
Ssl_accept_renegotiates
| numeric | GLOBAL
|
Ssl_accepts
| numeric | GLOBAL
|
Ssl_callback_cache_hits
| numeric | GLOBAL
|
Ssl_cipher
| string | GLOBAL | SESSION
|
Ssl_cipher_list
| string | GLOBAL | SESSION
|
Ssl_client_connects
| numeric | GLOBAL
|
Ssl_connect_renegotiates
| numeric | GLOBAL
|
Ssl_ctx_verify_depth
| numeric | GLOBAL
|
Ssl_ctx_verify_mode
| numeric | GLOBAL
|
Ssl_default_timeout
| numeric | GLOBAL | SESSION
|
Ssl_finished_accepts
| numeric | GLOBAL
|
Ssl_finished_connects
| numeric | GLOBAL
|
Ssl_server_not_after
| numeric | GLOBAL | SESSION
|
Ssl_server_not_before
| numeric | GLOBAL | SESSION
|
Ssl_session_cache_hits
| numeric | GLOBAL
|
Ssl_session_cache_misses
| numeric | GLOBAL
|
Ssl_session_cache_mode
| string | GLOBAL
|
Ssl_session_cache_overflows
| numeric | GLOBAL
|
Ssl_session_cache_size
| numeric | GLOBAL
|
Ssl_session_cache_timeouts
| numeric | GLOBAL
|
Ssl_sessions_reused
| numeric | GLOBAL | SESSION
|
Ssl_used_session_cache_entries
| numeric | GLOBAL
|
Ssl_verify_depth
| numeric | GLOBAL | SESSION
|
Ssl_verify_mode
| numeric | GLOBAL | SESSION
|
Ssl_version
| string | GLOBAL | SESSION
|
Table_locks_immediate
| numeric | GLOBAL
|
Table_locks_waited
| numeric | GLOBAL
|
Tc_log_max_pages_used
| numeric | GLOBAL
|
Tc_log_page_size
| numeric | GLOBAL
|
Tc_log_page_waits
| numeric | GLOBAL
|
Threads_cached
| numeric | GLOBAL
|
Threads_connected
| numeric | GLOBAL
|
Threads_created
| numeric | GLOBAL
|
Threads_running
| numeric | GLOBAL
|
Uptime
| numeric | GLOBAL
|
Uptime_since_flush_status
| numeric | GLOBAL |
The status variables have the following meanings.
Aborted_clientsThe number of connections that were aborted because the client died without closing the connection properly. See "Communication Errors and Aborted Connections".
Aborted_connectsThe number of failed attempts to connect to the MariaDB server. See "Communication Errors and Aborted Connections".
For additional connection-related information, check the
Connection_errors_status variables and thexxxhost_cachetable.Binlog_cache_disk_useThe number of transactions that used the temporary binary log cache but that exceeded the value of
binlog_cache_sizeand used a temporary file to store statements from the transaction.The number of nontransactional statements that caused the binary log transaction cache to be written to disk is tracked separately in the
Binlog_stmt_cache_disk_usestatus variable.Binlog_cache_useThe number of transactions that used the binary log cache.
Binlog_stmt_cache_disk_useThe number of nontransaction statements that used the binary log statement cache but that exceeded the value of
binlog_stmt_cache_sizeand used a temporary file to store those statements.Binlog_stmt_cache_useThe number of nontransactional statements that used the binary log statement cache.
Bytes_receivedThe number of bytes received from all clients.
Bytes_sentThe number of bytes sent to all clients.
Com_xxxThe
Com_statement counter variables indicate the number of times eachxxxxxxstatement has been executed. There is one status variable for each type of statement. For example,Com_deleteandCom_insertcountDELETEandINSERTstatements, respectively. However, if a query result is returned from query cache, the server increments theQcache_hitsstatus variable, notCom_select. See , "Query Cache Status and Maintenance".All of the
Com_stmt_variables are increased even if a prepared statement argument is unknown or an error occurred during execution. In other words, their values correspond to the number of requests issued, not to the number of requests successfully completed.xxxThe
Com_stmt_status variables are as follows:xxxCom_stmt_prepareCom_stmt_executeCom_stmt_fetchCom_stmt_send_long_dataCom_stmt_resetCom_stmt_close
Those variables stand for prepared statement commands. Their names refer to the
COM_command set used in the network layer. In other words, their values increase whenever prepared statement API calls such as mysql_stmt_prepare(), mysql_stmt_execute(), and so forth are executed. However,xxxCom_stmt_prepare,Com_stmt_executeandCom_stmt_closealso increase forPREPARE,EXECUTE, orDEALLOCATE PREPARE, respectively. Additionally, the values of the older statement counter variablesCom_prepare_sql,Com_execute_sql, andCom_dealloc_sqlincrease for thePREPARE,EXECUTE, andDEALLOCATE PREPAREstatements.Com_stmt_fetchstands for the total number of network round-trips issued when fetching from cursors.Com_stmt_reprepareindicated the number of times statements were automatically reprepared by the server after metadata changes to tables or views referred to by the statement. A reprepare operation incrementsCom_stmt_reprepare, and alsoCom_stmt_prepare.CompressionWhether the client connection uses compression in the client/server protocol.
Connection_errors_xxxThese variables provide information about errors that occur during the client connection process. They are global only and represent error counts aggregated across connections from all hosts. These variables track errors not accounted for by the host cache (see , "DNS Lookup Optimization and the Host Cache"), such as errors that are not associated with TCP connections, occur very early in the connection process (even before an IP address is known), or are not specific to any particular IP address (such as out-of-memory conditions). These variables were added in MariaDB 5.6.5.
Connection_errors_acceptThe number of errors that occurred during calls to
accept()on the listening port.Connection_errors_internalThe number of connections refused due to internal errors in the server, such as failure to start a new thread or an out-of-memory condition.
Connection_errors_max_connectionsThe number of connections refused because the server
max_connectionslimit was reached.Connection_errors_peer_addrThe number of errors that occurred while searching for connecting client IP addresses.
Connection_errors_selectThe number of errors that occurred during calls to
select()orpoll()on the listening port. (Failure of this operation does not necessarily means a client connection was rejected.)Connection_errors_tcpwrapThe number of connections refused by the
libwraplibrary.
ConnectionsThe number of connection attempts (successful or not) to the MariaDB server.
Created_tmp_disk_tablesThe number of internal on-disk temporary tables created by the server while executing statements.
If an internal temporary table is created initially as an in-memory table but becomes too large, MariaDB automatically converts it to an on-disk table. The maximum size for in-memory temporary tables is the minimum of the
tmp_table_sizeandmax_heap_table_sizevalues. IfCreated_tmp_disk_tablesis large, you may want to increase thetmp_table_sizeormax_heap_table_sizevalues. value to lessen the likelihood that internal temporary tables in memory will be converted to on-disk tables.You can compare the number of internal on-disk temporary tables created to the total number of internal temporary tables created by comparing the values of the
Created_tmp_disk_tablesandCreated_tmp_tablesvariables.Created_tmp_filesHow many temporary files mysqld has created.
Created_tmp_tablesThe number of internal temporary tables created by the server while executing statements.
You can compare the number of internal on-disk temporary tables created to the total number of internal temporary tables created by comparing the values of the
Created_tmp_disk_tablesandCreated_tmp_tablesvariables.See also , "How MariaDB Uses Internal Temporary Tables".
Each invocation of the
SHOW STATUSstatement uses an internal temporary table and increments the globalCreated_tmp_tablesvalue.Delayed_errorsThe number of rows written with
INSERT DELAYEDfor which some error occurred (probablyduplicate key).Delayed_insert_threadsThe number of
INSERT DELAYEDhandler threads in use for nontransactional tables.Delayed_writesThe number of
INSERT DELAYEDrows written to nontransactional tables.Flush_commandsThe number of times the server flushes tables, whether because a user executed a
FLUSH TABLESstatement or due to internal server operation. It is also incremented by receipt of aCOM_REFRESHpacket. This is in contrast toCom_flush, which indicates how manyFLUSHstatements have been executed, whetherFLUSH TABLES,FLUSH LOGS, and so forth.Handler_commitThe number of internal
COMMITstatements.Handler_deleteThe number of times that rows have been deleted from tables.
Handler_external_lockThe number of locks started while a statement executed.
Handler_prepareA counter for the prepare phase of two-phase commit operations.
Handler_read_firstThe number of times the first entry in an index was read. If this value is high, it suggests that the server is doing a lot of full index scans; for example,
SELECT col1 FROM foo, assuming thatcol1is indexed.Handler_read_keyThe number of requests to read a row based on a key. If this value is high, it is a good indication that your tables are properly indexed for your queries.
Handler_read_lastThe number of requests to read the last key in an index. With
ORDER BY, the server will issue a first-key request followed by several next-key requests, whereas with WithORDER BY DESC, the server will issue a last-key request followed by several previous-key requests. This variable was added in MariaDB 5.6.1.Handler_read_nextThe number of requests to read the next row in key order. This value is incremented if you are querying an index column with a range constraint or if you are doing an index scan.
Handler_read_prevThe number of requests to read the previous row in key order. This read method is mainly used to optimize
ORDER BY ... DESC.Handler_read_rndThe number of requests to read a row based on a fixed position. This value is high if you are doing a lot of queries that require sorting of the result. You probably have a lot of queries that require MariaDB to scan entire tables or you have joins that do not use keys properly.
Handler_read_rnd_nextThe number of requests to read the next row in the data file. This value is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.
Handler_rollbackThe number of requests for a storage engine to perform a rollback operation.
Handler_savepointThe number of requests for a storage engine to place a savepoint.
Handler_savepoint_rollbackThe number of requests for a storage engine to roll back to a savepoint.
Handler_updateThe number of requests to update a row in a table.
Handler_writeThe number of requests to insert a row in a table.
Innodb_buffer_pool_dump_statusThe progress of an operation to record the pages held in the InnoDB buffer pool, triggered by the setting of
innodb_buffer_pool_dump_at_shutdownorinnodb_buffer_pool_dump_now.Innodb_buffer_pool_load_statusThe progress of an operation to 'warm up' the InnoDB buffer pool by reading in a set of pages corresponding to an earlier point in time, triggered by the setting of
innodb_buffer_pool_load_at_startuporinnodb_buffer_pool_load_now. If the operation introduces too much overhead, you can cancel it by settinginnodb_buffer_pool_load_abort.Innodb_buffer_pool_pages_dataThe number of pages containing data (dirty or clean).
Innodb_buffer_pool_pages_dirtyThe number of pages currently dirty.
Innodb_buffer_pool_pages_flushedThe number of buffer pool page-flush requests.
Innodb_buffer_pool_pages_freeThe number of free pages.
Innodb_buffer_pool_pages_latchedThe number of latched pages in
InnoDBbuffer pool. These are pages currently being read or written or that cannot be flushed or removed for some other reason. Calculation of this variable is expensive, so it is available only when theUNIV_DEBUGsystem is defined at server build time.Innodb_buffer_pool_pages_miscThe number of pages that are busy because they have been allocated for administrative overhead such as row locks or the adaptive hash index. This value can also be calculated as
Innodb_buffer_pool_pages_total-Innodb_buffer_pool_pages_free-Innodb_buffer_pool_pages_data.Innodb_buffer_pool_pages_totalThe total size of the buffer pool, in pages.
Innodb_buffer_pool_read_aheadThe number of pages read into the
InnoDBbuffer pool by the read-ahead background thread.Innodb_buffer_pool_read_ahead_evictedThe number of pages read into the
InnoDBbuffer pool by the read-ahead background thread that were subsequently evicted without having been accessed by queries.Innodb_buffer_pool_read_requestsThe number of logical read requests
InnoDBhas done.Innodb_buffer_pool_readsThe number of logical reads that
InnoDBcould not satisfy from the buffer pool, and had to read directly from the disk.Innodb_buffer_pool_wait_freeNormally, writes to the
InnoDBbuffer pool happen in the background. However, if it is necessary to read or create a page and no clean pages are available, it is also necessary to wait for pages to be flushed first. This counter counts instances of these waits. If the buffer pool size has been set properly, this value should be small.Innodb_buffer_pool_write_requestsThe number writes done to the
InnoDBbuffer pool.Innodb_data_fsyncsThe number of
fsync()operations so far.Innodb_data_pending_fsyncsThe current number of pending
fsync()operations.Innodb_data_pending_readsThe current number of pending reads.
Innodb_data_pending_writesThe current number of pending writes.
Innodb_data_readThe amount of data read since the server was started.
Innodb_data_readsThe total number of data reads.
Innodb_data_writesThe total number of data writes.
Innodb_data_writtenThe amount of data written so far, in bytes.
Innodb_dblwr_pages_writtenThe number of pages that have been written for doublewrite operations. See , "
InnoDBDisk I/O".Innodb_dblwr_writesThe number of doublewrite operations that have been performed. See , "
InnoDBDisk I/O".Innodb_have_atomic_builtinsIndicates whether the server was built with atomic instructions.
Innodb_log_waitsThe number of times that the log buffer was too small and a wait was required for it to be flushed before continuing.
Innodb_log_write_requestsThe number of log write requests.
Innodb_log_writesThe number of physical writes to the log file.
Innodb_num_open_filesThe number of files
InnoDBcurrently holds open.Innodb_os_log_fsyncsThe number of
fsync()writes done to the log file.Innodb_os_log_pending_fsyncsThe number of pending log file
fsync()operations.Innodb_os_log_pending_writesThe number of pending log file writes.
Innodb_os_log_writtenThe number of bytes written to the log file.
Innodb_page_sizeThe compiled-in
InnoDBpage size (default 16KB). Many values are counted in pages; the page size enables them to be easily converted to bytes.Innodb_pages_createdThe number of pages created.
Innodb_pages_readThe number of pages read.
Innodb_pages_writtenThe number of pages written.
Innodb_row_lock_current_waitsThe number of row locks currently being waited for.
Innodb_row_lock_timeThe total time spent in acquiring row locks, in milliseconds.
Innodb_row_lock_time_avgThe average time to acquire a row lock, in milliseconds.
Innodb_row_lock_time_maxThe maximum time to acquire a row lock, in milliseconds.
Innodb_row_lock_waitsThe number of times a row lock had to be waited for.
Innodb_rows_deletedThe number of rows deleted from
InnoDBtables.Innodb_rows_insertedThe number of rows inserted into
InnoDBtables.Innodb_rows_readThe number of rows read from
InnoDBtables.Innodb_rows_updatedThe number of rows updated in
InnoDBtables.Innodb_truncated_status_writesThe number of times output from the
SHOW ENGINE INNODB STATUSstatement has been truncated.Key_blocks_not_flushedThe number of key blocks in the key cache that have changed but have not yet been flushed to disk.
Key_blocks_unusedThe number of unused blocks in the key cache. You can use this value to determine how much of the key cache is in use; see the discussion of
key_buffer_sizein , "Server System Variables".Key_blocks_usedThe number of used blocks in the key cache. This value is a high-water mark that indicates the maximum number of blocks that have ever been in use at one time.
Key_read_requestsThe number of requests to read a key block from the cache.
Key_readsThe number of physical reads of a key block from disk. If
Key-readsis large, then yourkey_buffer_sizevalue is probably too small. The cache miss rate can be calculated asKey_reads/Key_read_requests.Key_write_requestsThe number of requests to write a key block to the cache.
Key_writesThe number of physical writes of a key block to disk.
Last_query_costThe total cost of the last compiled query as computed by the query optimizer. This is useful for comparing the cost of different query plans for the same query. The default value of 0 means that no query has been compiled yet. The default value is 0.
Last_query_costhas session scope.The
Last_query_costvalue can be computed accurately only for simple "flat" queries, not complex queries such as those with subqueries orUNION. For the latter, the value is set to 0.Last_query_partial_plansThe number of iterations the query optimizer made in execution plan construction for the previous query.
Last_query_costhas session scope. This variable was added in MariaDB 5.6.5.Max_used_connectionsThe maximum number of connections that have been in use simultaneously since the server started.
Not_flushed_delayed_rowsThe number of rows waiting to be written to nontransactional tables in
INSERT DELAYEDqueues.Open_filesThe number of files that are open. This count includes regular files opened by the server. It does not include other types of files such as sockets or pipes. Also, the count does not include files that storage engines open using their own internal functions rather than asking the server level to do so.
Open_streamsThe number of streams that are open (used mainly for logging).
Open_table_definitionsThe number of cached
.frmfiles.Open_tablesThe number of tables that are open.
Opened_filesThe number of files that have been opened with
my_open()(amysyslibrary function). Parts of the server that open files without using this function do not increment the count.Opened_table_definitionsThe number of
.frmfiles that have been cached.Opened_tablesThe number of tables that have been opened. If
Opened-tablesis big, yourtable_open_cachevalue is probably too small.Performance_schema_xxxPerformance Schema status variables are listed in , "Performance Schema Status Variables".
Prepared_stmt_countThe current number of prepared statements. (The maximum number of statements is given by the
max_prepared_stmt_countsystem variable.)Qcache_free_blocksThe number of free memory blocks in the query cache.
Qcache_free_memoryThe amount of free memory for the query cache.
Qcache_hitsThe number of query cache hits.
Qcache_insertsThe number of queries added to the query cache.
Qcache_lowmem_prunesThe number of queries that were deleted from the query cache because of low memory.
Qcache_not_cachedThe number of noncached queries (not cacheable, or not cached due to the
query_cache_typesetting).Qcache_queries_in_cacheThe number of queries registered in the query cache.
Qcache_total_blocksThe total number of blocks in the query cache.
QueriesThe number of statements executed by the server. This variable includes statements executed within stored programs, unlike the
Questionsvariable. It does not countCOM_PINGorCOM_STATISTICScommands.QuestionsThe number of statements executed by the server. This includes only statements sent to the server by clients and not statements executed within stored programs, unlike the
Queriesvariable. This variable does not countCOM_PING,COM_STATISTICS,COM_STMT_PREPARE,COM_STMT_CLOSE, orCOM_STMT_RESETcommands.Rpl_semi_sync_master_clientsThe number of semisynchronous slaves.
This variable is available only if the master-side semisynchronous replication plugin is installed.
Rpl_semi_sync_master_net_avg_wait_timeThe average time in microseconds the master waited for a slave reply.
This variable is available only if the master-side semisynchronous replication plugin is installed.
Rpl_semi_sync_master_net_wait_timeThe total time in microseconds the master waited for slave replies.
This variable is available only if the master-side semisynchronous replication plugin is installed.
Rpl_semi_sync_master_net_waitsThe total number of times the master waited for slave replies.
This variable is available only if the master-side semisynchronous replication plugin is installed.
Rpl_semi_sync_master_no_timesThe number of times the master turned off semisynchronous replication.
This variable is available only if the master-side semisynchronous replication plugin is installed.
Rpl_semi_sync_master_no_txThe number of commits that were not acknowledged successfully by a slave.
This variable is available only if the master-side semisynchronous replication plugin is installed.
Rpl_semi_sync_master_statusWhether semisynchronous replication currently is operational on the master. The value is
ONif the plugin has been enabled and a commit acknowledgment has occurred. It isOFFif the plugin is not enabled or the master has fallen back to asynchronous replication due to commit acknowledgment timeout.This variable is available only if the master-side semisynchronous replication plugin is installed.
Rpl_semi_sync_master_timefunc_failuresThe number of times the master failed when calling time functions such as
gettimeofday().This variable is available only if the master-side semisynchronous replication plugin is installed.
Rpl_semi_sync_master_tx_avg_wait_timeThe average time in microseconds the master waited for each transaction.
This variable is available only if the master-side semisynchronous replication plugin is installed.
Rpl_semi_sync_master_tx_wait_timeThe total time in microseconds the master waited for transactions.
This variable is available only if the master-side semisynchronous replication plugin is installed.
Rpl_semi_sync_master_tx_waitsThe total number of times the master waited for transactions.
This variable is available only if the master-side semisynchronous replication plugin is installed.
Rpl_semi_sync_master_wait_pos_backtraverseThe total number of times the master waited for an event with binary coordinates lower than events waited for previously. This can occur when the order in which transactions start waiting for a reply is different from the order in which their binary log events are written.
This variable is available only if the master-side semisynchronous replication plugin is installed.
Rpl_semi_sync_master_wait_sessionsThe number of sessions currently waiting for slave replies.
This variable is available only if the master-side semisynchronous replication plugin is installed.
Rpl_semi_sync_master_yes_txThe number of commits that were acknowledged successfully by a slave.
This variable is available only if the master-side semisynchronous replication plugin is installed.
Rpl_semi_sync_slave_statusWhether semisynchronous replication currently is operational on the slave. This is
ONif the plugin has been enabled and the slave I/O thread is running,OFFotherwise.This variable is available only if the slave-side semisynchronous replication plugin is installed.
Select_full_joinThe number of joins that perform table scans because they do not use indexes. If this value is not 0, you should carefully check the indexes of your tables.
Select_full_range_joinThe number of joins that used a range search on a reference table.
Select_rangeThe number of joins that used ranges on the first table. This is normally not a critical issue even if the value is quite large.
Select_range_checkThe number of joins without keys that check for key usage after each row. If this is not 0, you should carefully check the indexes of your tables.
Select_scanThe number of joins that did a full scan of the first table.
Slave_heartbeat_periodShows the replication heartbeat interval (in seconds) on a replication slave.
Slave_last_heartbeatShows when the most recent heartbeat signal was received by a replication slave, as a
TIMESTAMPvalue.Slave_open_temp_tablesThe number of temporary tables that the slave SQL thread currently has open. If the value is greater than zero, it is not safe to shut down the slave; see , "Replication and Temporary Tables".
Slave_received_heartbeatsThis counter increments with each replication heartbeat received by a replication slave since the last time that the slave was restarted or reset, or a
CHANGE MASTER TOstatement was issued.Slave_retried_transactionsThe total number of times since startup that the replication slave SQL thread has retried transactions.
Slave_runningThis is
ONif this server is a replication slave that is connected to a replication master, and both the I/O and SQL threads are running; otherwise, it isOFF.Slow_launch_threadsThe number of threads that have taken more than
slow_launch_timeseconds to create.Slow_queriesThe number of queries that have taken more than
long-query-timeseconds. See , "The Slow Query Log".Sort_merge_passesThe number of merge passes that the sort algorithm has had to do. If this value is large, you should consider increasing the value of the
sort_buffer_sizesystem variable.Sort_rangeThe number of sorts that were done using ranges.
Sort_rowsThe number of sorted rows.
Sort_scanThe number of sorts that were done by scanning the table.
Ssl_accept_renegotiatesThe number of negotiates needed to establish the connection.
Ssl_acceptsThe number of accepted SSL connections.
Ssl_callback_cache_hitsThe number of callback cache hits.
Ssl_cipherThe current SSL cipher (empty for non-SSL connections).
Ssl_cipher_listThe list of possible SSL ciphers.
Ssl_client_connectsThe number of SSL connection attempts to an SSL-enabled master.
Ssl_connect_renegotiatesThe number of negotiates needed to establish the connection to an SSL-enabled master.
Ssl_ctx_verify_depthThe SSL context verification depth (how many certificates in the chain are tested).
Ssl_ctx_verify_modeThe SSL context verification mode.
Ssl_default_timeoutThe default SSL timeout.
Ssl_finished_acceptsThe number of successful SSL connections to the server.
Ssl_finished_connectsThe number of successful slave connections to an SSL-enabled master.
Ssl_server_not_afterThe last date for which the SSL certificate is valid. This variable was added in MariaDB 5.6.3.
Ssl_server_not_beforeThe first date for which the SSL certificate is valid. This variable was added in MariaDB 5.6.3.
Ssl_session_cache_hitsThe number of SSL session cache hits.
Ssl_session_cache_missesThe number of SSL session cache misses.
Ssl_session_cache_modeThe SSL session cache mode.
Ssl_session_cache_overflowsThe number of SSL session cache overflows.
Ssl_session_cache_sizeThe SSL session cache size.
Ssl_session_cache_timeoutsThe number of SSL session cache timeouts.
Ssl_sessions_reusedHow many SSL connections were reused from the cache.
Ssl_used_session_cache_entriesHow many SSL session cache entries were used.
Ssl_verify_depthThe verification depth for replication SSL connections.
Ssl_verify_modeThe verification mode for replication SSL connections.
Ssl_versionThe SSL protocol version of the connection.
Table_locks_immediateThe number of times that a request for a table lock could be granted immediately.
Table_locks_waitedThe number of times that a request for a table lock could not be granted immediately and a wait was needed. If this is high and you have performance problems, you should first optimize your queries, and then either split your table or tables or use replication.
Tc_log_max_pages_usedFor the memory-mapped implementation of the log that is used by mysqld when it acts as the transaction coordinator for recovery of internal XA transactions, this variable indicates the largest number of pages used for the log since the server started. If the product of
Tc_log_max_pages_usedandTc_log_page_sizeis always significantly less than the log size, the size is larger than necessary and can be reduced. (The size is set by the--log-tc-sizeoption. Currently, this variable is unused: It is unneeded for binary log-based recovery, and the memory-mapped recovery log method is not used unless the number of storage engines capable of two-phase commit is greater than one. (InnoDBis the only applicable engine.)Tc_log_page_sizeThe page size used for the memory-mapped implementation of the XA recovery log. The default value is determined using
getpagesize(). Currently, this variable is unused for the same reasons as described forTc_log_max_pages_used.Tc_log_page_waitsFor the memory-mapped implementation of the recovery log, this variable increments each time the server was not able to commit a transaction and had to wait for a free page in the log. If this value is large, you might want to increase the log size (with the
--log-tc-sizeoption). For binary log-based recovery, this variable increments each time the binary log cannot be closed because there are two-phase commits in progress. (The close operation waits until all such transactions are finished.)Threads_cachedThe number of threads in the thread cache.
Threads_connectedThe number of currently open connections.
Threads_createdThe number of threads created to handle connections. If
Threads_createdis big, you may want to increase thethread_cache_sizevalue. The cache miss rate can be calculated asThreads_created/Connections.Threads_runningThe number of threads that are not sleeping.
UptimeThe number of seconds that the server has been up.
Uptime_since_flush_statusThe number of seconds since the most recent
FLUSH STATUSstatement.