Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.5Mb
PDF (A4) - 35.5Mb
PDF (RPM) - 34.5Mb
EPUB - 8.7Mb
HTML Download (TGZ) - 8.5Mb
HTML Download (Zip) - 8.5Mb
HTML Download (RPM) - 7.3Mb
Eclipse Doc Plugin (TGZ) - 9.3Mb
Eclipse Doc Plugin (Zip) - 11.5Mb
Man Pages (TGZ) - 201.5Kb
Man Pages (Zip) - 306.8Kb
Info (Gzip) - 3.3Mb
Info (Zip) - 3.3Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  /  ...  /  Server Status Variables

6.1.6 Server Status Variables

The MySQL 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 14.7.5.35, “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    |
+-----------------------------------+------------+

Several status variables provide statement counts. To determine the number of statements executed, use these relationships:

  SUM(Com_xxx) + Qcache_hits
= Questions + statements executed within stored programs
= Queries

Many status variables are reset to 0 by the FLUSH STATUS statement.

The following table lists all available server status variables:

Table 6.4 Status Variable Summary

Variable NameVariable TypeVariable Scope
Aborted_clientsintegerGLOBAL
Aborted_connectsintegerGLOBAL
Audit_log_current_sizeintegerGLOBAL
Audit_log_event_max_drop_sizeintegerGLOBAL
Audit_log_eventsintegerGLOBAL
Audit_log_events_filteredintegerGLOBAL
Audit_log_events_lostintegerGLOBAL
Audit_log_events_writtenintegerGLOBAL
Audit_log_total_sizeintegerGLOBAL
Audit_log_write_waitsintegerGLOBAL
Binlog_cache_disk_useintegerGLOBAL
Binlog_cache_useintegerGLOBAL
Binlog_stmt_cache_disk_useintegerGLOBAL
Binlog_stmt_cache_useintegerGLOBAL
Bytes_receivedintegerGLOBAL | SESSION
Bytes_sentintegerGLOBAL | SESSION
Com_admin_commandsintegerGLOBAL | SESSION
Com_alter_dbintegerGLOBAL | SESSION
Com_alter_db_upgradeintegerGLOBAL | SESSION
Com_alter_eventintegerGLOBAL | SESSION
Com_alter_functionintegerGLOBAL | SESSION
Com_alter_procedureintegerGLOBAL | SESSION
Com_alter_serverintegerGLOBAL | SESSION
Com_alter_tableintegerGLOBAL | SESSION
Com_alter_tablespaceintegerGLOBAL | SESSION
Com_alter_userintegerGLOBAL | SESSION
Com_analyzeintegerGLOBAL | SESSION
Com_assign_to_keycacheintegerGLOBAL | SESSION
Com_beginintegerGLOBAL | SESSION
Com_binlogintegerGLOBAL | SESSION
Com_call_procedureintegerGLOBAL | SESSION
Com_change_dbintegerGLOBAL | SESSION
Com_change_masterintegerGLOBAL | SESSION
Com_change_repl_filterintegerGLOBAL | SESSION
Com_checkintegerGLOBAL | SESSION
Com_checksumintegerGLOBAL | SESSION
Com_commitintegerGLOBAL | SESSION
Com_create_dbintegerGLOBAL | SESSION
Com_create_eventintegerGLOBAL | SESSION
Com_create_functionintegerGLOBAL | SESSION
Com_create_indexintegerGLOBAL | SESSION
Com_create_procedureintegerGLOBAL | SESSION
Com_create_serverintegerGLOBAL | SESSION
Com_create_tableintegerGLOBAL | SESSION
Com_create_triggerintegerGLOBAL | SESSION
Com_create_udfintegerGLOBAL | SESSION
Com_create_userintegerGLOBAL | SESSION
Com_create_viewintegerGLOBAL | SESSION
Com_dealloc_sqlintegerGLOBAL | SESSION
Com_deleteintegerGLOBAL | SESSION
Com_delete_multiintegerGLOBAL | SESSION
Com_dointegerGLOBAL | SESSION
Com_drop_dbintegerGLOBAL | SESSION
Com_drop_eventintegerGLOBAL | SESSION
Com_drop_functionintegerGLOBAL | SESSION
Com_drop_indexintegerGLOBAL | SESSION
Com_drop_procedureintegerGLOBAL | SESSION
Com_drop_serverintegerGLOBAL | SESSION
Com_drop_tableintegerGLOBAL | SESSION
Com_drop_triggerintegerGLOBAL | SESSION
Com_drop_userintegerGLOBAL | SESSION
Com_drop_viewintegerGLOBAL | SESSION
Com_empty_queryintegerGLOBAL | SESSION
Com_execute_sqlintegerGLOBAL | SESSION
Com_explain_otherintegerGLOBAL | SESSION
Com_flushintegerGLOBAL | SESSION
Com_get_diagnosticsintegerGLOBAL | SESSION
Com_grantintegerGLOBAL | SESSION
Com_ha_closeintegerGLOBAL | SESSION
Com_ha_openintegerGLOBAL | SESSION
Com_ha_readintegerGLOBAL | SESSION
Com_helpintegerGLOBAL | SESSION
Com_insertintegerGLOBAL | SESSION
Com_insert_selectintegerGLOBAL | SESSION
Com_install_pluginintegerGLOBAL | SESSION
Com_killintegerGLOBAL | SESSION
Com_loadintegerGLOBAL | SESSION
Com_lock_tablesintegerGLOBAL | SESSION
Com_optimizeintegerGLOBAL | SESSION
Com_preload_keysintegerGLOBAL | SESSION
Com_prepare_sqlintegerGLOBAL | SESSION
Com_purgeintegerGLOBAL | SESSION
Com_purge_before_dateintegerGLOBAL | SESSION
Com_release_savepointintegerGLOBAL | SESSION
Com_rename_tableintegerGLOBAL | SESSION
Com_rename_userintegerGLOBAL | SESSION
Com_repairintegerGLOBAL | SESSION
Com_replaceintegerGLOBAL | SESSION
Com_replace_selectintegerGLOBAL | SESSION
Com_resetintegerGLOBAL | SESSION
Com_resignalintegerGLOBAL | SESSION
Com_revokeintegerGLOBAL | SESSION
Com_revoke_allintegerGLOBAL | SESSION
Com_rollbackintegerGLOBAL | SESSION
Com_rollback_to_savepointintegerGLOBAL | SESSION
Com_savepointintegerGLOBAL | SESSION
Com_selectintegerGLOBAL | SESSION
Com_set_optionintegerGLOBAL | SESSION
Com_show_authorsintegerGLOBAL | SESSION
Com_show_binlog_eventsintegerGLOBAL | SESSION
Com_show_binlogsintegerGLOBAL | SESSION
Com_show_charsetsintegerGLOBAL | SESSION
Com_show_collationsintegerGLOBAL | SESSION
Com_show_contributorsintegerGLOBAL | SESSION
Com_show_create_dbintegerGLOBAL | SESSION
Com_show_create_eventintegerGLOBAL | SESSION
Com_show_create_funcintegerGLOBAL | SESSION
Com_show_create_procintegerGLOBAL | SESSION
Com_show_create_tableintegerGLOBAL | SESSION
Com_show_create_triggerintegerGLOBAL | SESSION
Com_show_create_userintegerGLOBAL | SESSION
Com_show_databasesintegerGLOBAL | SESSION
Com_show_engine_logsintegerGLOBAL | SESSION
Com_show_engine_mutexintegerGLOBAL | SESSION
Com_show_engine_statusintegerGLOBAL | SESSION
Com_show_errorsintegerGLOBAL | SESSION
Com_show_eventsintegerGLOBAL | SESSION
Com_show_fieldsintegerGLOBAL | SESSION
Com_show_function_codeintegerGLOBAL | SESSION
Com_show_function_statusintegerGLOBAL | SESSION
Com_show_grantsintegerGLOBAL | SESSION
Com_show_keysintegerGLOBAL | SESSION
Com_show_master_statusintegerGLOBAL | SESSION
Com_show_ndb_statusintegerGLOBAL | SESSION
Com_show_new_masterintegerGLOBAL | SESSION
Com_show_open_tablesintegerGLOBAL | SESSION
Com_show_pluginsintegerGLOBAL | SESSION
Com_show_privilegesintegerGLOBAL | SESSION
Com_show_procedure_codeintegerGLOBAL | SESSION
Com_show_procedure_statusintegerGLOBAL | SESSION
Com_show_processlistintegerGLOBAL | SESSION
Com_show_profileintegerGLOBAL | SESSION
Com_show_profilesintegerGLOBAL | SESSION
Com_show_relaylog_eventsintegerGLOBAL | SESSION
Com_show_slave_hostsintegerGLOBAL | SESSION
Com_show_slave_statusintegerGLOBAL | SESSION
Com_show_slave_status_nonblockingintegerGLOBAL | SESSION
Com_show_statusintegerGLOBAL | SESSION
Com_show_storage_enginesintegerGLOBAL | SESSION
Com_show_table_statusintegerGLOBAL | SESSION
Com_show_tablesintegerGLOBAL | SESSION
Com_show_triggersintegerGLOBAL | SESSION
Com_show_variablesintegerGLOBAL | SESSION
Com_show_warningsintegerGLOBAL | SESSION
Com_shutdownintegerGLOBAL | SESSION
Com_signalintegerGLOBAL | SESSION
Com_slave_startintegerGLOBAL | SESSION
Com_slave_stopintegerGLOBAL | SESSION
Com_stmt_closeintegerGLOBAL | SESSION
Com_stmt_executeintegerGLOBAL | SESSION
Com_stmt_fetchintegerGLOBAL | SESSION
Com_stmt_prepareintegerGLOBAL | SESSION
Com_stmt_reprepareintegerGLOBAL | SESSION
Com_stmt_resetintegerGLOBAL | SESSION
Com_stmt_send_long_dataintegerGLOBAL | SESSION
Com_truncateintegerGLOBAL | SESSION
Com_uninstall_pluginintegerGLOBAL | SESSION
Com_unlock_tablesintegerGLOBAL | SESSION
Com_updateintegerGLOBAL | SESSION
Com_update_multiintegerGLOBAL | SESSION
Com_xa_commitintegerGLOBAL | SESSION
Com_xa_endintegerGLOBAL | SESSION
Com_xa_prepareintegerGLOBAL | SESSION
Com_xa_recoverintegerGLOBAL | SESSION
Com_xa_rollbackintegerGLOBAL | SESSION
Com_xa_startintegerGLOBAL | SESSION
CompressionintegerSESSION
Connection_errors_acceptintegerGLOBAL
Connection_errors_internalintegerGLOBAL
Connection_errors_max_connectionsintegerGLOBAL
Connection_errors_peer_addrintegerGLOBAL
Connection_errors_selectintegerGLOBAL
Connection_errors_tcpwrapintegerGLOBAL
ConnectionsintegerGLOBAL
Created_tmp_disk_tablesintegerGLOBAL | SESSION
Created_tmp_filesintegerGLOBAL
Created_tmp_tablesintegerGLOBAL | SESSION
Delayed_errorsintegerGLOBAL
Delayed_insert_threadsintegerGLOBAL
Delayed_writesintegerGLOBAL
Firewall_access_deniedintegerGLOBAL
Firewall_access_grantedintegerGLOBAL
Firewall_cached_entriesintegerGLOBAL
Flush_commandsintegerGLOBAL
Handler_commitintegerGLOBAL | SESSION
Handler_deleteintegerGLOBAL | SESSION
Handler_discoverintegerGLOBAL | SESSION
Handler_external_lockintegerGLOBAL | SESSION
Handler_mrr_initintegerGLOBAL | SESSION
Handler_prepareintegerGLOBAL | SESSION
Handler_read_firstintegerGLOBAL | SESSION
Handler_read_keyintegerGLOBAL | SESSION
Handler_read_lastintegerGLOBAL | SESSION
Handler_read_nextintegerGLOBAL | SESSION
Handler_read_previntegerGLOBAL | SESSION
Handler_read_rndintegerGLOBAL | SESSION
Handler_read_rnd_nextintegerGLOBAL | SESSION
Handler_rollbackintegerGLOBAL | SESSION
Handler_savepointintegerGLOBAL | SESSION
Handler_savepoint_rollbackintegerGLOBAL | SESSION
Handler_updateintegerGLOBAL | SESSION
Handler_writeintegerGLOBAL | SESSION
Innodb_available_undo_logsintegerGLOBAL
Innodb_buffer_pool_bytes_dataintegerGLOBAL
Innodb_buffer_pool_bytes_dirtyintegerGLOBAL
Innodb_buffer_pool_dump_statusstringGLOBAL
Innodb_buffer_pool_load_statusstringGLOBAL
Innodb_buffer_pool_pages_dataintegerGLOBAL
Innodb_buffer_pool_pages_dirtyintegerGLOBAL
Innodb_buffer_pool_pages_flushedintegerGLOBAL
Innodb_buffer_pool_pages_freeintegerGLOBAL
Innodb_buffer_pool_pages_latchedintegerGLOBAL
Innodb_buffer_pool_pages_miscintegerGLOBAL
Innodb_buffer_pool_pages_totalintegerGLOBAL
Innodb_buffer_pool_read_aheadintegerGLOBAL
Innodb_buffer_pool_read_ahead_evictedintegerGLOBAL
Innodb_buffer_pool_read_ahead_rndintegerGLOBAL
Innodb_buffer_pool_read_requestsintegerGLOBAL
Innodb_buffer_pool_readsintegerGLOBAL
Innodb_buffer_pool_resize_statusstringGLOBAL
Innodb_buffer_pool_wait_freeintegerGLOBAL
Innodb_buffer_pool_write_requestsintegerGLOBAL
Innodb_data_fsyncsintegerGLOBAL
Innodb_data_pending_fsyncsintegerGLOBAL
Innodb_data_pending_readsintegerGLOBAL
Innodb_data_pending_writesintegerGLOBAL
Innodb_data_readintegerGLOBAL
Innodb_data_readsintegerGLOBAL
Innodb_data_writesintegerGLOBAL
Innodb_data_writtenintegerGLOBAL
Innodb_dblwr_pages_writtenintegerGLOBAL
Innodb_dblwr_writesintegerGLOBAL
Innodb_have_atomic_builtinsintegerGLOBAL
Innodb_log_waitsintegerGLOBAL
Innodb_log_write_requestsintegerGLOBAL
Innodb_log_writesintegerGLOBAL
Innodb_num_open_filesintegerGLOBAL
Innodb_os_log_fsyncsintegerGLOBAL
Innodb_os_log_pending_fsyncsintegerGLOBAL
Innodb_os_log_pending_writesintegerGLOBAL
Innodb_os_log_writtenintegerGLOBAL
Innodb_page_sizeintegerGLOBAL
Innodb_pages_createdintegerGLOBAL
Innodb_pages_readintegerGLOBAL
Innodb_pages_writtenintegerGLOBAL
Innodb_row_lock_current_waitsintegerGLOBAL
Innodb_row_lock_timeintegerGLOBAL
Innodb_row_lock_time_avgintegerGLOBAL
Innodb_row_lock_time_maxintegerGLOBAL
Innodb_row_lock_waitsintegerGLOBAL
Innodb_rows_deletedintegerGLOBAL
Innodb_rows_insertedintegerGLOBAL
Innodb_rows_readintegerGLOBAL
Innodb_rows_updatedintegerGLOBAL
Innodb_truncated_status_writesintegerGLOBAL
Key_blocks_not_flushedintegerGLOBAL
Key_blocks_unusedintegerGLOBAL
Key_blocks_usedintegerGLOBAL
Key_read_requestsintegerGLOBAL
Key_readsintegerGLOBAL
Key_write_requestsintegerGLOBAL
Key_writesintegerGLOBAL
Last_query_costnumericSESSION
Last_query_partial_plansintegerSESSION
Locked_connectsintegerGLOBAL
Max_execution_time_exceededintegerGLOBAL | SESSION
Max_execution_time_setintegerGLOBAL | SESSION
Max_execution_time_set_failedintegerGLOBAL | SESSION
Max_statement_time_exceededintegerGLOBAL | SESSION
Max_statement_time_setintegerGLOBAL | SESSION
Max_statement_time_set_failedintegerGLOBAL | SESSION
Max_used_connectionsintegerGLOBAL
Max_used_connections_timedatetimeGLOBAL
mecab_charsetstringGLOBAL
Mysqlx_bytes_receivedintegerGLOBAL | SESSION
Mysqlx_bytes_sentintegerGLOBAL | SESSION
Mysqlx_connection_accept_errorsintegerGLOBAL | SESSION
Mysqlx_connection_errorsintegerGLOBAL | SESSION
Mysqlx_connections_acceptedintegerGLOBAL
Mysqlx_connections_closedintegerGLOBAL
Mysqlx_connections_rejectedintegerGLOBAL
Mysqlx_crud_deleteintegerGLOBAL | SESSION
Mysqlx_crud_findintegerGLOBAL | SESSION
Mysqlx_crud_insertintegerGLOBAL | SESSION
Mysqlx_crud_updateintegerGLOBAL | SESSION
Mysqlx_errors_sentintegerGLOBAL | SESSION
Mysqlx_expect_closeintegerGLOBAL | SESSION
Mysqlx_expect_openintegerGLOBAL | SESSION
Mysqlx_init_errorintegerGLOBAL | SESSION
Mysqlx_notice_other_sentintegerGLOBAL | SESSION
Mysqlx_notice_warning_sentintegerGLOBAL | SESSION
Mysqlx_rows_sentintegerGLOBAL | SESSION
Mysqlx_sessionsintegerGLOBAL
Mysqlx_sessions_acceptedintegerGLOBAL
Mysqlx_sessions_closedintegerGLOBAL
Mysqlx_sessions_fatal_errorintegerGLOBAL
Mysqlx_sessions_killedintegerGLOBAL
Mysqlx_sessions_rejectedintegerGLOBAL
Mysqlx_ssl_accept_renegotiatesintegerGLOBAL
Mysqlx_ssl_acceptsintegerGLOBAL
Mysqlx_ssl_activeintegerGLOBAL | SESSION
Mysqlx_ssl_cipherintegerGLOBAL | SESSION
Mysqlx_ssl_cipher_listintegerGLOBAL | SESSION
Mysqlx_ssl_ctx_verify_depthintegerGLOBAL | SESSION
Mysqlx_ssl_ctx_verify_modeintegerGLOBAL | SESSION
Mysqlx_ssl_finished_acceptsintegerGLOBAL
Mysqlx_ssl_server_not_afterintegerGLOBAL
Mysqlx_ssl_server_not_beforeintegerGLOBAL
Mysqlx_ssl_verify_depthintegerGLOBAL
Mysqlx_ssl_verify_modeintegerGLOBAL
Mysqlx_ssl_versionintegerGLOBAL | SESSION
Mysqlx_stmt_create_collectionintegerGLOBAL | SESSION
Mysqlx_stmt_create_collection_indexintegerGLOBAL | SESSION
Mysqlx_stmt_disable_noticesintegerGLOBAL | SESSION
Mysqlx_stmt_drop_collectionintegerGLOBAL | SESSION
Mysqlx_stmt_drop_collection_indexintegerGLOBAL | SESSION
Mysqlx_stmt_enable_noticesintegerGLOBAL | SESSION
Mysqlx_stmt_execute_sqlintegerGLOBAL | SESSION
Mysqlx_stmt_execute_xpluginintegerGLOBAL | SESSION
Mysqlx_stmt_kill_clientintegerGLOBAL | SESSION
Mysqlx_stmt_list_clientsintegerGLOBAL | SESSION
Mysqlx_stmt_list_noticesintegerGLOBAL | SESSION
Mysqlx_stmt_list_objectsintegerGLOBAL | SESSION
Mysqlx_stmt_pingintegerGLOBAL | SESSION
Mysqlx_worker_threadsintegerGLOBAL
Mysqlx_worker_threads_activeintegerGLOBAL
Ndb_api_bytes_received_countintegerGLOBAL
Ndb_api_bytes_received_count_sessionintegerSESSION
Ndb_api_bytes_received_count_slaveintegerGLOBAL
Ndb_api_bytes_sent_countintegerGLOBAL
Ndb_api_bytes_sent_count_slaveintegerGLOBAL
Ndb_api_event_bytes_count_injectorintegerGLOBAL
Ndb_api_event_data_count_injectorintegerGLOBAL
Ndb_api_event_nondata_count_injectorintegerGLOBAL
Ndb_api_pk_op_countintegerGLOBAL
Ndb_api_pk_op_count_sessionintegerSESSION
Ndb_api_pk_op_count_slaveintegerGLOBAL
Ndb_api_pruned_scan_countintegerGLOBAL
Ndb_api_pruned_scan_count_sessionintegerSESSION
Ndb_api_range_scan_count_slaveintegerGLOBAL
Ndb_api_read_row_countintegerGLOBAL
Ndb_api_read_row_count_sessionintegerSESSION
Ndb_api_scan_batch_count_slaveintegerGLOBAL
Ndb_api_table_scan_countintegerGLOBAL
Ndb_api_table_scan_count_sessionintegerSESSION
Ndb_api_trans_abort_countintegerGLOBAL
Ndb_api_trans_abort_count_sessionintegerSESSION
Ndb_api_trans_abort_count_slaveintegerGLOBAL
Ndb_api_trans_close_countintegerGLOBAL
Ndb_api_trans_close_count_sessionintegerSESSION
Ndb_api_trans_close_count_slaveintegerGLOBAL
Ndb_api_trans_commit_countintegerGLOBAL
Ndb_api_trans_commit_count_sessionintegerSESSION
Ndb_api_trans_commit_count_slaveintegerGLOBAL
Ndb_api_trans_local_read_row_count_slaveintegerGLOBAL
Ndb_api_trans_start_countintegerGLOBAL
Ndb_api_trans_start_count_sessionintegerSESSION
Ndb_api_trans_start_count_slaveintegerGLOBAL
Ndb_api_uk_op_countintegerGLOBAL
Ndb_api_uk_op_count_slaveintegerGLOBAL
Ndb_api_wait_exec_complete_countintegerGLOBAL
Ndb_api_wait_exec_complete_count_sessionintegerSESSION
Ndb_api_wait_exec_complete_count_slaveintegerGLOBAL
Ndb_api_wait_meta_request_countintegerGLOBAL
Ndb_api_wait_meta_request_count_sessionintegerSESSION
Ndb_api_wait_nanos_countintegerGLOBAL
Ndb_api_wait_nanos_count_sessionintegerSESSION
Ndb_api_wait_nanos_count_slaveintegerGLOBAL
Ndb_api_wait_scan_result_countintegerGLOBAL
Ndb_api_wait_scan_result_count_sessionintegerSESSION
Ndb_api_wait_scan_result_count_slaveintegerGLOBAL
Ndb_cluster_node_idintegerGLOBAL | SESSION
Ndb_config_from_hostintegerGLOBAL | SESSION
Ndb_config_from_portintegerGLOBAL | SESSION
Ndb_conflict_fn_epoch_transintegerGLOBAL
Ndb_conflict_fn_maxintegerGLOBAL
Ndb_conflict_fn_oldintegerGLOBAL
Ndb_conflict_trans_detect_iter_countintegerGLOBAL
Ndb_conflict_trans_row_reject_countintegerGLOBAL
Ndb_last_commit_epoch_serverintegerGLOBAL
Ndb_last_commit_epoch_sessionintegerSESSION
Ndb_cluster_node_idintegerGLOBAL
Ndb_number_of_data_nodesintegerGLOBAL
Ndb_pushed_queries_definedintegerGLOBAL
Ndb_pushed_queries_executedintegerGLOBAL
Ndb_scan_countintegerGLOBAL
Not_flushed_delayed_rowsintegerGLOBAL
Ongoing_anonymous_gtid_violating_transaction_countintegerGLOBAL
Ongoing_anonymous_transaction_countintegerGLOBAL
Ongoing_automatic_gtid_violating_transaction_countintegerGLOBAL
Open_filesintegerGLOBAL
Open_streamsintegerGLOBAL
Open_table_definitionsintegerGLOBAL
Open_tablesintegerGLOBAL | SESSION
Opened_filesintegerGLOBAL
Opened_table_definitionsintegerGLOBAL | SESSION
Opened_tablesintegerGLOBAL | SESSION
Performance_schema_accounts_lostintegerGLOBAL
Performance_schema_cond_classes_lostintegerGLOBAL
Performance_schema_cond_instances_lostintegerGLOBAL
Performance_schema_digest_lostintegerGLOBAL
Performance_schema_file_classes_lostintegerGLOBAL
Performance_schema_file_handles_lostintegerGLOBAL
Performance_schema_file_instances_lostintegerGLOBAL
Performance_schema_hosts_lostintegerGLOBAL
Performance_schema_index_stat_lostintegerGLOBAL
Performance_schema_locker_lostintegerGLOBAL
Performance_schema_memory_classes_lostintegerGLOBAL
Performance_schema_metadata_lock_lostintegerGLOBAL
Performance_schema_mutex_classes_lostintegerGLOBAL
Performance_schema_mutex_instances_lostintegerGLOBAL
Performance_schema_nested_statement_lostintegerGLOBAL
Performance_schema_prepared_statements_lostintegerGLOBAL
Performance_schema_program_lostintegerGLOBAL
Performance_schema_rwlock_classes_lostintegerGLOBAL
Performance_schema_rwlock_instances_lostintegerGLOBAL
Performance_schema_session_connect_attrs_lostintegerGLOBAL
Performance_schema_socket_classes_lostintegerGLOBAL
Performance_schema_socket_instances_lostintegerGLOBAL
Performance_schema_stage_classes_lostintegerGLOBAL
Performance_schema_statement_classes_lostintegerGLOBAL
Performance_schema_table_handles_lostintegerGLOBAL
Performance_schema_table_instances_lostintegerGLOBAL
Performance_schema_table_lock_stat_lostintegerGLOBAL
Performance_schema_thread_classes_lostintegerGLOBAL
Performance_schema_thread_instances_lostintegerGLOBAL
Performance_schema_users_lostintegerGLOBAL
Prepared_stmt_countintegerGLOBAL
Qcache_free_blocksintegerGLOBAL
Qcache_free_memoryintegerGLOBAL
Qcache_hitsintegerGLOBAL
Qcache_insertsintegerGLOBAL
Qcache_lowmem_prunesintegerGLOBAL
Qcache_not_cachedintegerGLOBAL
Qcache_queries_in_cacheintegerGLOBAL
Qcache_total_blocksintegerGLOBAL
QueriesintegerGLOBAL | SESSION
QuestionsintegerGLOBAL | SESSION
Rewriter_number_loaded_rulesintegerGLOBAL
Rewriter_number_reloadsintegerGLOBAL
Rewriter_number_rewritten_queriesintegerGLOBAL
Rewriter_reload_errorbooleanGLOBAL
Rpl_semi_sync_master_clientsintegerGLOBAL
Rpl_semi_sync_master_net_avg_wait_timeintegerGLOBAL
Rpl_semi_sync_master_net_wait_timeintegerGLOBAL
Rpl_semi_sync_master_net_waitsintegerGLOBAL
Rpl_semi_sync_master_no_timesintegerGLOBAL
Rpl_semi_sync_master_no_txintegerGLOBAL
Rpl_semi_sync_master_statusbooleanGLOBAL
Rpl_semi_sync_master_timefunc_failuresintegerGLOBAL
Rpl_semi_sync_master_tx_avg_wait_timeintegerGLOBAL
Rpl_semi_sync_master_tx_wait_timeintegerGLOBAL
Rpl_semi_sync_master_tx_waitsintegerGLOBAL
Rpl_semi_sync_master_wait_pos_backtraverseintegerGLOBAL
Rpl_semi_sync_master_wait_sessionsintegerGLOBAL
Rpl_semi_sync_master_yes_txintegerGLOBAL
Rpl_semi_sync_slave_statusbooleanGLOBAL
Rsa_public_keystringGLOBAL
Select_full_joinintegerGLOBAL | SESSION
Select_full_range_joinintegerGLOBAL | SESSION
Select_rangeintegerGLOBAL | SESSION
Select_range_checkintegerGLOBAL | SESSION
Select_scanintegerGLOBAL | SESSION
Slave_heartbeat_periodnumericGLOBAL
Slave_last_heartbeat GLOBAL
Slave_open_temp_tablesintegerGLOBAL
Slave_received_heartbeats GLOBAL
Slave_retried_transactionsintegerGLOBAL
Slave_runningbooleanGLOBAL
Slow_launch_threadsintegerGLOBAL | SESSION
Slow_queriesintegerGLOBAL | SESSION
Sort_merge_passesintegerGLOBAL | SESSION
Sort_rangeintegerGLOBAL | SESSION
Sort_rowsintegerGLOBAL | SESSION
Sort_scanintegerGLOBAL | SESSION
Ssl_accept_renegotiatesintegerGLOBAL
Ssl_acceptsintegerGLOBAL
Ssl_callback_cache_hitsintegerGLOBAL
Ssl_cipherstringGLOBAL | SESSION
Ssl_cipher_liststringGLOBAL | SESSION
Ssl_client_connectsintegerGLOBAL
Ssl_connect_renegotiatesintegerGLOBAL
Ssl_ctx_verify_depthintegerGLOBAL
Ssl_ctx_verify_modeintegerGLOBAL
Ssl_default_timeoutintegerGLOBAL | SESSION
Ssl_finished_acceptsintegerGLOBAL
Ssl_finished_connectsintegerGLOBAL
Ssl_server_not_afterintegerGLOBAL | SESSION
Ssl_server_not_beforeintegerGLOBAL | SESSION
Ssl_session_cache_hitsintegerGLOBAL
Ssl_session_cache_missesintegerGLOBAL
Ssl_session_cache_modestringGLOBAL
Ssl_session_cache_overflowsintegerGLOBAL
Ssl_session_cache_sizeintegerGLOBAL
Ssl_session_cache_timeoutsintegerGLOBAL
Ssl_sessions_reusedintegerGLOBAL | SESSION
Ssl_used_session_cache_entriesintegerGLOBAL
Ssl_verify_depthintegerGLOBAL | SESSION
Ssl_verify_modeintegerGLOBAL | SESSION
Ssl_versionstringGLOBAL | SESSION
Table_locks_immediateintegerGLOBAL
Table_locks_waitedintegerGLOBAL
Table_open_cache_hitsintegerGLOBAL | SESSION
Table_open_cache_missesintegerGLOBAL | SESSION
Table_open_cache_overflowsintegerGLOBAL | SESSION
Tc_log_max_pages_usedintegerGLOBAL
Tc_log_page_sizeintegerGLOBAL
Tc_log_page_waitsintegerGLOBAL
Threads_cachedintegerGLOBAL
Threads_connectedintegerGLOBAL
Threads_createdintegerGLOBAL
Threads_runningintegerGLOBAL
UptimeintegerGLOBAL
Uptime_since_flush_statusintegerGLOBAL
validate_password_dictionary_file_last_parseddatetimeGLOBAL
validate_password_dictionary_file_words_countintegerGLOBAL

The status variables have the meanings shown in the following list. For meanings of status variables specific to MySQL Cluster, see Section 19.3.3.8.3, “MySQL Cluster Status Variables”.


User Comments
  Posted by Demetrios Stavrinos on July 22, 2004
Reading the explanation for Handler read rnd next , I question it! I list some number from a test db that does almost all accesses by locating a record with a key (GE or xxx%) and then using next to access related record; yet the Handler read rnd next is relatively large.
Handler read key 42053
Handler read next 453703
Handler read rnd 696
Handler read rnd next 104378

  Posted by Heikki Hannikainen on April 28, 2006
On MySQL 5.0 the com_* variables of 'show status' are counted for the current connection only. The new undocumented command 'show global status' shows server-wide counters. (http://bugs.mysql.com/bug.php?id=19422)
  Posted by sheila yao on April 16, 2007
In version 4.0.17, the explanation to Handler_ is different:
Example:
Handler_delete:
The number of times a row was deleted from a table.
Handler_update
The number of requests to update a row in a table.
Handler_write
The number of requests to insert a row in a table.

Could this be a typo for Handler_delete? Because requests and rows updated/deleted/inserted are different concept.

Sheila

  Posted by Roel Van de Paar on September 21, 2009
There's a bug in 5.0.36 (and likely surrounding versions) for Handler_write: it increases by one every time a row from SHOW STATUS is displayed:

------
mysql> FLUSH STATUS;
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW GLOBAL STATUS; SHOW SESSION STATUS;
[...] 224 rows in set (0.01 sec)
[...] 224 rows in set (0.01 sec)

mysql> SHOW SESSION STATUS LIKE 'Handler_write';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Handler_write | 448 |
+---------------+-------+
1 row in set (0.00 sec)
------

Given the bug for Handler_write it is not possible to find out how many rows were inserted in this version, unless you use a workaround:

Rows_inserted= Handler_write - (number of times SHOW STATUS was run * number of rows SHOW STATUS displayed)

This could be programmed further using the Com_show_status variable:

--------
mysql> SHOW SESSION STATUS LIKE 'Com_show_status';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| Com_show_status | 8 |
+-----------------+-------+
1 row in set (0.00 sec)
--------

So, on a system/version that had 224 rows in SHOW STATUS (please check), the workaround formula would be:

Rows_inserted=Handler_write-(Com_show_status * 224)

Note though that this workaround does not work when using partial SHOW STATUS statements (using LIKE etc) from time to time.
Sign Up Login You must be logged in to post a comment.