5.1.6 Server Status Variables

来源:互联网 发布:excel 数据统计技巧 编辑:程序博客网 时间:2024/06/04 08:04

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.34, “SHOW STATUS Syntax”). The optional GLOBAL keyword aggregates the values over all connections, and SESSIONshows 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 NameVariable TypeVariable ScopeAborted_clientsnumericGLOBALAborted_connectsnumericGLOBALBinlog_cache_disk_usenumericGLOBALBinlog_cache_usenumericGLOBALBinlog_stmt_cache_disk_usenumericGLOBALBinlog_stmt_cache_usenumericGLOBALBytes_receivednumericGLOBAL | SESSIONBytes_sentnumericGLOBAL | SESSIONCom_admin_commandsnumericGLOBAL | SESSIONCom_alter_dbnumericGLOBAL | SESSIONCom_alter_db_upgradenumericGLOBAL | SESSIONCom_alter_eventnumericGLOBAL | SESSIONCom_alter_functionnumericGLOBAL | SESSIONCom_alter_procedurenumericGLOBAL | SESSIONCom_alter_servernumericGLOBAL | SESSIONCom_alter_tablenumericGLOBAL | SESSIONCom_alter_tablespacenumericGLOBAL | SESSIONCom_alter_usernumericGLOBAL | SESSIONCom_analyzenumericGLOBAL | SESSIONCom_assign_to_keycachenumericGLOBAL | SESSIONCom_beginnumericGLOBAL | SESSIONCom_binlognumericGLOBAL | SESSIONCom_call_procedurenumericGLOBAL | SESSIONCom_change_dbnumericGLOBAL | SESSIONCom_change_masternumericGLOBAL | SESSIONCom_change_repl_filternumericGLOBAL | SESSIONCom_checknumericGLOBAL | SESSIONCom_checksumnumericGLOBAL | SESSIONCom_commitnumericGLOBAL | SESSIONCom_create_dbnumericGLOBAL | SESSIONCom_create_eventnumericGLOBAL | SESSIONCom_create_functionnumericGLOBAL | SESSIONCom_create_indexnumericGLOBAL | SESSIONCom_create_procedurenumericGLOBAL | SESSIONCom_create_servernumericGLOBAL | SESSIONCom_create_tablenumericGLOBAL | SESSIONCom_create_triggernumericGLOBAL | SESSIONCom_create_udfnumericGLOBAL | SESSIONCom_create_usernumericGLOBAL | SESSIONCom_create_viewnumericGLOBAL | SESSIONCom_dealloc_sqlnumericGLOBAL | SESSIONCom_deletenumericGLOBAL | SESSIONCom_delete_multinumericGLOBAL | SESSIONCom_donumericGLOBAL | SESSIONCom_drop_dbnumericGLOBAL | SESSIONCom_drop_eventnumericGLOBAL | SESSIONCom_drop_functionnumericGLOBAL | SESSIONCom_drop_indexnumericGLOBAL | SESSIONCom_drop_procedurenumericGLOBAL | SESSIONCom_drop_servernumericGLOBAL | SESSIONCom_drop_tablenumericGLOBAL | SESSIONCom_drop_triggernumericGLOBAL | SESSIONCom_drop_usernumericGLOBAL | SESSIONCom_drop_viewnumericGLOBAL | SESSIONCom_empty_querynumericGLOBAL | SESSIONCom_execute_sqlnumericGLOBAL | SESSIONCom_flushnumericGLOBAL | SESSIONCom_get_diagnosticsnumericGLOBAL | SESSIONCom_grantnumericGLOBAL | SESSIONCom_ha_closenumericGLOBAL | SESSIONCom_ha_opennumericGLOBAL | SESSIONCom_ha_readnumericGLOBAL | SESSIONCom_helpnumericGLOBAL | SESSIONCom_insertnumericGLOBAL | SESSIONCom_insert_selectnumericGLOBAL | SESSIONCom_install_pluginnumericGLOBAL | SESSIONCom_killnumericGLOBAL | SESSIONCom_loadnumericGLOBAL | SESSIONCom_lock_tablesnumericGLOBAL | SESSIONCom_optimizenumericGLOBAL | SESSIONCom_preload_keysnumericGLOBAL | SESSIONCom_prepare_sqlnumericGLOBAL | SESSIONCom_purgenumericGLOBAL | SESSIONCom_purge_before_datenumericGLOBAL | SESSIONCom_release_savepointnumericGLOBAL | SESSIONCom_rename_tablenumericGLOBAL | SESSIONCom_rename_usernumericGLOBAL | SESSIONCom_repairnumericGLOBAL | SESSIONCom_replacenumericGLOBAL | SESSIONCom_replace_selectnumericGLOBAL | SESSIONCom_resetnumericGLOBAL | SESSIONCom_resignalnumericGLOBAL | SESSIONCom_revokenumericGLOBAL | SESSIONCom_revoke_allnumericGLOBAL | SESSIONCom_rollbacknumericGLOBAL | SESSIONCom_rollback_to_savepointnumericGLOBAL | SESSIONCom_savepointnumericGLOBAL | SESSIONCom_selectnumericGLOBAL | SESSIONCom_set_optionnumericGLOBAL | SESSIONCom_show_authorsnumericGLOBAL | SESSIONCom_show_binlog_eventsnumericGLOBAL | SESSIONCom_show_binlogsnumericGLOBAL | SESSIONCom_show_charsetsnumericGLOBAL | SESSIONCom_show_collationsnumericGLOBAL | SESSIONCom_show_contributorsnumericGLOBAL | SESSIONCom_show_create_dbnumericGLOBAL | SESSIONCom_show_create_eventnumericGLOBAL | SESSIONCom_show_create_funcnumericGLOBAL | SESSIONCom_show_create_procnumericGLOBAL | SESSIONCom_show_create_tablenumericGLOBAL | SESSIONCom_show_create_triggernumericGLOBAL | SESSIONCom_show_databasesnumericGLOBAL | SESSIONCom_show_engine_logsnumericGLOBAL | SESSIONCom_show_engine_mutexnumericGLOBAL | SESSIONCom_show_engine_statusnumericGLOBAL | SESSIONCom_show_errorsnumericGLOBAL | SESSIONCom_show_eventsnumericGLOBAL | SESSIONCom_show_fieldsnumericGLOBAL | SESSIONCom_show_function_codenumericGLOBAL | SESSIONCom_show_function_statusnumericGLOBAL | SESSIONCom_show_grantsnumericGLOBAL | SESSIONCom_show_keysnumericGLOBAL | SESSIONCom_show_master_statusnumericGLOBAL | SESSIONCom_show_new_masternumericGLOBAL | SESSIONCom_show_open_tablesnumericGLOBAL | SESSIONCom_show_pluginsnumericGLOBAL | SESSIONCom_show_privilegesnumericGLOBAL | SESSIONCom_show_procedure_codenumericGLOBAL | SESSIONCom_show_procedure_statusnumericGLOBAL | SESSIONCom_show_processlistnumericGLOBAL | SESSIONCom_show_profilenumericGLOBAL | SESSIONCom_show_profilesnumericGLOBAL | SESSIONCom_show_relaylog_eventsnumericGLOBAL | SESSIONCom_show_slave_hostsnumericGLOBAL | SESSIONCom_show_slave_statusnumericGLOBAL | SESSIONCom_show_statusnumericGLOBAL | SESSIONCom_show_storage_enginesnumericGLOBAL | SESSIONCom_show_table_statusnumericGLOBAL | SESSIONCom_show_tablesnumericGLOBAL | SESSIONCom_show_triggersnumericGLOBAL | SESSIONCom_show_variablesnumericGLOBAL | SESSIONCom_show_warningsnumericGLOBAL | SESSIONCom_signalnumericGLOBAL | SESSIONCom_slave_startnumericGLOBAL | SESSIONCom_slave_stopnumericGLOBAL | SESSIONCom_stmt_closenumericGLOBAL | SESSIONCom_stmt_executenumericGLOBAL | SESSIONCom_stmt_fetchnumericGLOBAL | SESSIONCom_stmt_preparenumericGLOBAL | SESSIONCom_stmt_repreparenumericGLOBAL | SESSIONCom_stmt_resetnumericGLOBAL | SESSIONCom_stmt_send_long_datanumericGLOBAL | SESSIONCom_truncatenumericGLOBAL | SESSIONCom_uninstall_pluginnumericGLOBAL | SESSIONCom_unlock_tablesnumericGLOBAL | SESSIONCom_updatenumericGLOBAL | SESSIONCom_update_multinumericGLOBAL | SESSIONCom_xa_commitnumericGLOBAL | SESSIONCom_xa_endnumericGLOBAL | SESSIONCom_xa_preparenumericGLOBAL | SESSIONCom_xa_recovernumericGLOBAL | SESSIONCom_xa_rollbacknumericGLOBAL | SESSIONCom_xa_startnumericGLOBAL | SESSIONCompressionnumericSESSIONConnection_errors_acceptnumericGLOBALConnection_errors_internalnumericGLOBALConnection_errors_max_connectionsnumericGLOBALConnection_errors_peer_addrnumericGLOBALConnection_errors_selectnumericGLOBALConnection_errors_tcpwrapnumericGLOBALConnectionsnumericGLOBALCreated_tmp_disk_tablesnumericGLOBAL | SESSIONCreated_tmp_filesnumericGLOBALCreated_tmp_tablesnumericGLOBAL | SESSIONDelayed_errorsnumericGLOBALDelayed_insert_threadsnumericGLOBALDelayed_writesnumericGLOBALFlush_commandsnumericGLOBALHandler_commitnumericGLOBAL | SESSIONHandler_deletenumericGLOBAL | SESSIONHandler_discovernumericGLOBAL | SESSIONHandler_external_locknumericGLOBAL | SESSIONHandler_mrr_initnumericGLOBAL | SESSIONHandler_preparenumericGLOBAL | SESSIONHandler_read_firstnumericGLOBAL | SESSIONHandler_read_keynumericGLOBAL | SESSIONHandler_read_lastnumericGLOBAL | SESSIONHandler_read_nextnumericGLOBAL | SESSIONHandler_read_prevnumericGLOBAL | SESSIONHandler_read_rndnumericGLOBAL | SESSIONHandler_read_rnd_nextnumericGLOBAL | SESSIONHandler_rollbacknumericGLOBAL | SESSIONHandler_savepointnumericGLOBAL | SESSIONHandler_savepoint_rollbacknumericGLOBAL | SESSIONHandler_updatenumericGLOBAL | SESSIONHandler_writenumericGLOBAL | SESSIONInnodb_available_undo_logsnumericGLOBALInnodb_buffer_pool_bytes_datanumericGLOBALInnodb_buffer_pool_bytes_dirtynumericGLOBALInnodb_buffer_pool_dump_statusnumericGLOBALInnodb_buffer_pool_load_statusnumericGLOBALInnodb_buffer_pool_pages_datanumericGLOBALInnodb_buffer_pool_pages_dirtynumericGLOBALInnodb_buffer_pool_pages_flushednumericGLOBALInnodb_buffer_pool_pages_freenumericGLOBALInnodb_buffer_pool_pages_latchednumericGLOBALInnodb_buffer_pool_pages_miscnumericGLOBALInnodb_buffer_pool_pages_totalnumericGLOBALInnodb_buffer_pool_read_aheadnumericGLOBALInnodb_buffer_pool_read_ahead_evictednumericGLOBALInnodb_buffer_pool_read_requestsnumericGLOBALInnodb_buffer_pool_readsnumericGLOBALInnodb_buffer_pool_wait_freenumericGLOBALInnodb_buffer_pool_write_requestsnumericGLOBALInnodb_data_fsyncsnumericGLOBALInnodb_data_pending_fsyncsnumericGLOBALInnodb_data_pending_readsnumericGLOBALInnodb_data_pending_writesnumericGLOBALInnodb_data_readnumericGLOBALInnodb_data_readsnumericGLOBALInnodb_data_writesnumericGLOBALInnodb_data_writtennumericGLOBALInnodb_dblwr_pages_writtennumericGLOBALInnodb_dblwr_writesnumericGLOBALInnodb_have_atomic_builtinsnumericGLOBALInnodb_log_waitsnumericGLOBALInnodb_log_write_requestsnumericGLOBALInnodb_log_writesnumericGLOBALInnodb_num_open_filesnumericGLOBALInnodb_os_log_fsyncsnumericGLOBALInnodb_os_log_pending_fsyncsnumericGLOBALInnodb_os_log_pending_writesnumericGLOBALInnodb_os_log_writtennumericGLOBALInnodb_page_sizenumericGLOBALInnodb_pages_creatednumericGLOBALInnodb_pages_readnumericGLOBALInnodb_pages_writtennumericGLOBALInnodb_row_lock_current_waitsnumericGLOBALInnodb_row_lock_timenumericGLOBALInnodb_row_lock_time_avgnumericGLOBALInnodb_row_lock_time_maxnumericGLOBALInnodb_row_lock_waitsnumericGLOBALInnodb_rows_deletednumericGLOBALInnodb_rows_insertednumericGLOBALInnodb_rows_readnumericGLOBALInnodb_rows_updatednumericGLOBALInnodb_truncated_status_writesnumericGLOBALKey_blocks_not_flushednumericGLOBALKey_blocks_unusednumericGLOBALKey_blocks_usednumericGLOBALKey_read_requestsnumericGLOBALKey_readsnumericGLOBALKey_write_requestsnumericGLOBALKey_writesnumericGLOBALLast_query_costnumericSESSIONLast_query_partial_plansnumericSESSIONMax_statement_time_exceedednumericGLOBAL | SESSIONMax_statement_time_setnumericGLOBAL | SESSIONMax_statement_time_set_failednumericGLOBAL | SESSIONMax_used_connectionsnumericGLOBALMax_used_connections_timedatetimeGLOBALNdb_conflict_fn_maxnumericGLOBALNdb_conflict_fn_oldnumericGLOBALNdb_number_of_data_nodesnumericGLOBALNot_flushed_delayed_rowsnumericGLOBALOpen_filesnumericGLOBALOpen_streamsnumericGLOBALOpen_table_definitionsnumericGLOBALOpen_tablesnumericGLOBAL | SESSIONOpened_filesnumericGLOBALOpened_table_definitionsnumericGLOBAL | SESSIONOpened_tablesnumericGLOBAL | SESSIONPerformance_schema_accounts_lostnumericGLOBALPerformance_schema_cond_classes_lostnumericGLOBALPerformance_schema_cond_instances_lostnumericGLOBALPerformance_schema_digest_lostnumericGLOBALPerformance_schema_file_classes_lostnumericGLOBALPerformance_schema_file_handles_lostnumericGLOBALPerformance_schema_file_instances_lostnumericGLOBALPerformance_schema_hosts_lostnumericGLOBALPerformance_schema_locker_lostnumericGLOBALPerformance_schema_memory_classes_lostnumericGLOBALPerformance_schema_metadata_lock_lostnumericGLOBALPerformance_schema_mutex_classes_lostnumericGLOBALPerformance_schema_mutex_instances_lostnumericGLOBALPerformance_schema_nested_statement_lostnumericGLOBALPerformance_schema_prepared_statements_lostnumericGLOBALPerformance_schema_program_lostnumericGLOBALPerformance_schema_rwlock_classes_lostnumericGLOBALPerformance_schema_rwlock_instances_lostnumericGLOBALPerformance_schema_session_connect_attrs_lostnumericGLOBALPerformance_schema_socket_classes_lostnumericGLOBALPerformance_schema_socket_instances_lostnumericGLOBALPerformance_schema_stage_classes_lostnumericGLOBALPerformance_schema_statement_classes_lostnumericGLOBALPerformance_schema_table_handles_lostnumericGLOBALPerformance_schema_table_instances_lostnumericGLOBALPerformance_schema_thread_classes_lostnumericGLOBALPerformance_schema_thread_instances_lostnumericGLOBALPerformance_schema_users_lostnumericGLOBALPrepared_stmt_countnumericGLOBALQcache_free_blocksnumericGLOBALQcache_free_memorynumericGLOBALQcache_hitsnumericGLOBALQcache_insertsnumericGLOBALQcache_lowmem_prunesnumericGLOBALQcache_not_cachednumericGLOBALQcache_queries_in_cachenumericGLOBALQcache_total_blocksnumericGLOBALQueriesnumericGLOBAL | SESSIONQuestionsnumericGLOBAL | SESSIONRpl_semi_sync_master_clientsnumericGLOBALRpl_semi_sync_master_net_avg_wait_timenumericGLOBALRpl_semi_sync_master_net_wait_timenumericGLOBALRpl_semi_sync_master_net_waitsnumericGLOBALRpl_semi_sync_master_no_timesnumericGLOBALRpl_semi_sync_master_no_txnumericGLOBALRpl_semi_sync_master_statusbooleanGLOBALRpl_semi_sync_master_timefunc_failuresnumericGLOBALRpl_semi_sync_master_tx_avg_wait_timenumericGLOBALRpl_semi_sync_master_tx_wait_timenumericGLOBALRpl_semi_sync_master_tx_waitsnumericGLOBALRpl_semi_sync_master_wait_pos_backtraversenumericGLOBALRpl_semi_sync_master_wait_sessionsnumericGLOBALRpl_semi_sync_master_yes_txnumericGLOBALRpl_semi_sync_slave_statusbooleanGLOBALRsa_public_keystringGLOBALSelect_full_joinnumericGLOBAL | SESSIONSelect_full_range_joinnumericGLOBAL | SESSIONSelect_rangenumericGLOBAL | SESSIONSelect_range_checknumericGLOBAL | SESSIONSelect_scannumericGLOBAL | SESSIONSlave_heartbeat_period GLOBALSlave_last_heartbeat GLOBALSlave_open_temp_tablesnumericGLOBALSlave_received_heartbeats GLOBALSlave_retried_transactionsnumericGLOBALSlave_runningbooleanGLOBALSlow_launch_threadsnumericGLOBAL | SESSIONSlow_queriesnumericGLOBAL | SESSIONSort_merge_passesnumericGLOBAL | SESSIONSort_rangenumericGLOBAL | SESSIONSort_rowsnumericGLOBAL | SESSIONSort_scannumericGLOBAL | SESSIONSsl_accept_renegotiatesnumericGLOBALSsl_acceptsnumericGLOBALSsl_callback_cache_hitsnumericGLOBALSsl_cipherstringGLOBAL | SESSIONSsl_cipher_liststringGLOBAL | SESSIONSsl_client_connectsnumericGLOBALSsl_connect_renegotiatesnumericGLOBALSsl_ctx_verify_depthnumericGLOBALSsl_ctx_verify_modenumericGLOBALSsl_default_timeoutnumericGLOBAL | SESSIONSsl_finished_acceptsnumericGLOBALSsl_finished_connectsnumericGLOBALSsl_server_not_afternumericGLOBAL | SESSIONSsl_server_not_beforenumericGLOBAL | SESSIONSsl_session_cache_hitsnumericGLOBALSsl_session_cache_missesnumericGLOBALSsl_session_cache_modestringGLOBALSsl_session_cache_overflowsnumericGLOBALSsl_session_cache_sizenumericGLOBALSsl_session_cache_timeoutsnumericGLOBALSsl_sessions_reusednumericGLOBAL | SESSIONSsl_used_session_cache_entriesnumericGLOBALSsl_verify_depthnumericGLOBAL | SESSIONSsl_verify_modenumericGLOBAL | SESSIONSsl_versionstringGLOBAL | SESSIONTable_locks_immediatenumericGLOBALTable_locks_waitednumericGLOBALTable_open_cache_hitsnumericGLOBAL | SESSIONTable_open_cache_missesnumericGLOBAL | SESSIONTable_open_cache_overflowsnumericGLOBAL | SESSIONTc_log_max_pages_usednumericGLOBALTc_log_page_sizenumericGLOBALTc_log_page_waitsnumericGLOBALThreads_cachednumericGLOBALThreads_connectednumericGLOBALThreads_creatednumericGLOBALThreads_runningnumericGLOBALUptimenumericGLOBALUptime_since_flush_statusnumericGLOBAL

The status variables have the following meanings.

  •  Aborted_clients

    The number of connections that were aborted because the client died without closing the connection properly. SeeSection C.5.2.11, “Communication Errors and Aborted Connections”.

  •  Aborted_connects

    The number of failed attempts to connect to the MySQL server. See Section C.5.2.11, “Communication Errors and Aborted Connections”.

    For additional connection-related information, check the Connection_errors_xxx status variables and thehost_cache table.

    As of MySQL 5.7.3, Aborted_connects is not visible in the embedded server because for that server it is not updated and is not meaningful.

  •  Binlog_cache_disk_use

    The number of transactions that used the temporary binary log cache but that exceeded the value ofbinlog_cache_size and 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_use status variable.

  •  Binlog_cache_use

    The number of transactions that used the binary log cache.

  •  Binlog_stmt_cache_disk_use

    The number of nontransaction statements that used the binary log statement cache but that exceeded the value ofbinlog_stmt_cache_size and used a temporary file to store those statements.

  •  Binlog_stmt_cache_use

    The number of nontransactional statements that used the binary log statement cache.

  •  Bytes_received

    The number of bytes received from all clients.

  •  Bytes_sent

    The number of bytes sent to all clients.

  •  Com_xxx

    The Com_xxx statement counter variables indicate the number of times each xxx statement has been executed. There is one status variable for each type of statement. For example, Com_delete and Com_update countDELETE and UPDATE statements, respectively. Com_delete_multi and Com_update_multi are similar but apply to DELETE and UPDATE statements that use multiple-table syntax.

    If a query result is returned from query cache, the server increments the Qcache_hits status variable, notCom_select. See Section 8.9.3.4, “Query Cache Status and Maintenance”.

    All of the Com_stmt_xxx 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.

    The Com_stmt_xxx status variables are as follows:

    • Com_stmt_prepare

    • Com_stmt_execute

    • Com_stmt_fetch

    • Com_stmt_send_long_data

    • Com_stmt_reset

    • Com_stmt_close

    Those variables stand for prepared statement commands. Their names refer to the COM_xxx command set used in the network layer. In other words, their values increase whenever prepared statement API calls such asmysql_stmt_prepare()mysql_stmt_execute(), and so forth are executed. However, Com_stmt_prepare,Com_stmt_execute and Com_stmt_close also increase for PREPAREEXECUTE, or DEALLOCATE PREPARE, respectively. Additionally, the values of the older statement counter variables Com_prepare_sql,Com_execute_sql, and Com_dealloc_sql increase for the PREPAREEXECUTE, and DEALLOCATE PREPAREstatements. Com_stmt_fetch stands for the total number of network round-trips issued when fetching from cursors.

    Com_stmt_reprepare indicates 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 also Com_stmt_prepare.

    Com_change_repl_filter indicates the number of CHANGE REPLICATION FILTER statements executed. It was introduced in MySQL 5.7.3.

  •  Compression

    Whether the client connection uses compression in the client/server protocol.

  •  Connection_errors_xxx

    These 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 Section 8.11.5.2, “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).

    As of MySQL 5.7.3, the Connection_errors_xxx status variables are not visible in the embedded server because for that server they are not updated and are not meaningful.

    •  Connection_errors_accept

      The number of errors that occurred during calls to accept() on the listening port.

    •  Connection_errors_internal

      The 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_connections

      The number of connections refused because the server max_connections limit was reached.

    •  Connection_errors_peer_addr

      The number of errors that occurred while searching for connecting client IP addresses.

    •  Connection_errors_select

      The number of errors that occurred during calls to select() or poll() on the listening port. (Failure of this operation does not necessarily means a client connection was rejected.)

    •  Connection_errors_tcpwrap

      The number of connections refused by the libwrap library.

  •  Connections

    The number of connection attempts (successful or not) to the MySQL server.

  •  Created_tmp_disk_tables

    The 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, MySQL automatically converts it to an on-disk table. The maximum size for in-memory temporary tables is the minimum of the tmp_table_size and max_heap_table_size values. If Created_tmp_disk_tables is large, you may want to increase the tmp_table_size or max_heap_table_size 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_tables and Created_tmp_tablesvariables.

    See also Section 8.4.4, “How MySQL Uses Internal Temporary Tables”.

  •  Created_tmp_files

    How many temporary files mysqld has created.

  •  Created_tmp_tables

    The 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_tables and Created_tmp_tablesvariables.

    See also Section 8.4.4, “How MySQL Uses Internal Temporary Tables”.

    Each invocation of the SHOW STATUS statement uses an internal temporary table and increments the globalCreated_tmp_tables value.

  •  Delayed_errors

    In MySQL 5.7, this status variable is deprecated (because DELAYED inserts are not supported), and will be removed in a future release.

  •  Delayed_insert_threads

    In MySQL 5.7, this status variable is deprecated (because DELAYED inserts are not supported), and will be removed in a future release.

  •  Delayed_writes

    In MySQL 5.7, this status variable is deprecated (because DELAYED inserts are not supported), and will be removed in a future release.

  •  Flush_commands

    The number of times the server flushes tables, whether because a user executed a FLUSH TABLES statement or due to internal server operation. It is also incremented by receipt of a COM_REFRESH packet. This is in contrast toCom_flush, which indicates how many FLUSH statements have been executed, whether FLUSH TABLESFLUSH LOGS, and so forth.

  •  Handler_commit

    The number of internal COMMIT statements.

  •  Handler_delete

    The number of times that rows have been deleted from tables.

  •  Handler_external_lock

    The server increments this variable for each call to its external_lock() function, which generally occurs at the beginning and end of access to a table instance. There might be differences among storage engines. This variable can be used, for example, to discover for a statement that accesses a partitioned table how many partitions were pruned before locking occurred: Check how much the counter increased for the statement, subtract 2 (2 calls for the table itself), then divide by 2 to get the number of partitions locked.

  •  Handler_mrr_init

    The number of times the server uses a storage engine's own Multi-Range Read implementation for table access.

  •  Handler_prepare

    A counter for the prepare phase of two-phase commit operations.

  •  Handler_read_first

    The 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 that col1 is indexed.

  •  Handler_read_key

    The 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_last

    The 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 With ORDER BY DESC, the server will issue a last-key request followed by several previous-key requests.

  •  Handler_read_next

    The 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_prev

    The number of requests to read the previous row in key order. This read method is mainly used to optimize ORDER BY ... DESC.

  •  Handler_read_rnd

    The 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 MySQL to scan entire tables or you have joins that do not use keys properly.

  •  Handler_read_rnd_next

    The 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_rollback

    The number of requests for a storage engine to perform a rollback operation.

  •  Handler_savepoint

    The number of requests for a storage engine to place a savepoint.

  •  Handler_savepoint_rollback

    The number of requests for a storage engine to roll back to a savepoint.

  •  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.

  •  Innodb_available_undo_logs

    The total number of available InnoDB undo logs. Supplements the innodb_undo_logs system variable, which reports the number of active undo logs.

  •  Innodb_buffer_pool_dump_status

    The progress of an operation to record the pages held in the InnoDB buffer pool, triggered by the setting ofinnodb_buffer_pool_dump_at_shutdown or innodb_buffer_pool_dump_now.

  •  Innodb_buffer_pool_load_status

    The 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_startup orinnodb_buffer_pool_load_now. If the operation introduces too much overhead, you can cancel it by settinginnodb_buffer_pool_load_abort.

  •  Innodb_buffer_pool_bytes_data

    The total number of bytes in the InnoDB buffer pool containing data. The number includes both dirty and clean pages. For more accurate memory usage calculations than with Innodb_buffer_pool_pages_data, whencompressed tables cause the buffer pool to hold pages of different sizes.

  •  Innodb_buffer_pool_pages_data

    The number of pages in the InnoDB buffer pool containing data. The number includes both dirty and clean pages.

  •  Innodb_buffer_pool_bytes_dirty

    The total current number of bytes held in dirty pages in the InnoDB buffer pool. For more accurate memory usage calculations than with Innodb_buffer_pool_pages_dirty, when compressed tables cause the buffer pool to hold pages of different sizes.

  •  Innodb_buffer_pool_pages_dirty

    The current number of dirty pages in the InnoDB buffer pool.

  •  Innodb_buffer_pool_pages_flushed

    The number of requests to flush pages from the InnoDB buffer pool.

  •  Innodb_buffer_pool_pages_free

    The number of free pages in the InnoDB buffer pool.

  •  Innodb_buffer_pool_pages_latched

    The number of latched pages in the InnoDB buffer 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 the UNIV_DEBUG system is defined at server build time.

  •  Innodb_buffer_pool_pages_misc

    The number of pages in the InnoDB buffer pool 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 asInnodb_buffer_pool_pages_total – Innodb_buffer_pool_pages_free –Innodb_buffer_pool_pages_data.

  •  Innodb_buffer_pool_pages_total

    The total size of the InnoDB buffer pool, in pages.

  •  Innodb_buffer_pool_read_ahead

    The number of pages read into the InnoDB buffer pool by the read-ahead background thread.

  •  Innodb_buffer_pool_read_ahead_evicted

    The number of pages read into the InnoDB buffer pool by the read-ahead background thread that were subsequently evicted without having been accessed by queries.

  •  Innodb_buffer_pool_read_requests

    The number of logical read requests.

  •  Innodb_buffer_pool_reads

    The number of logical reads that InnoDB could not satisfy from the buffer pool, and had to read directly from disk.

  •  Innodb_buffer_pool_wait_free

    Normally, writes to the InnoDB buffer pool happen in the background. When InnoDB needs to read or create apage and no clean pages are available, InnoDB flushes some dirty pages first and waits for that operation to finish. This counter counts instances of these waits. If innodb_buffer_pool_size has been set properly, this value should be small.

  •  Innodb_buffer_pool_write_requests

    The number of writes done to the InnoDB buffer pool.

  •  Innodb_data_fsyncs

    The number of fsync() operations so far. The frequency of fsync() calls is influenced by the setting of theinnodb_flush_method configuration option.

  •  Innodb_data_pending_fsyncs

    The current number of pending fsync() operations. The frequency of fsync() calls is influenced by the setting of the innodb_flush_method configuration option.

  •  Innodb_data_pending_reads

    The current number of pending reads.

  •  Innodb_data_pending_writes

    The current number of pending writes.

  •  Innodb_data_read

    The amount of data read since the server was started.

  •  Innodb_data_reads

    The total number of data reads.

  •  Innodb_data_writes

    The total number of data writes.

  •  Innodb_data_written

    The amount of data written so far, in bytes.

  •  Innodb_dblwr_pages_written

    The number of pages that have been written to the doublewrite buffer. See Section 14.2.10.1, “InnoDB Disk I/O”.

  •  Innodb_dblwr_writes

    The number of doublewrite operations that have been performed. See Section 14.2.10.1, “InnoDB Disk I/O”.

  •  Innodb_have_atomic_builtins

    Indicates whether the server was built with atomic instructions.

  •  Innodb_log_waits

    The 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_requests

    The number of write requests for the InnoDB redo log.

  •  Innodb_log_writes

    The number of physical writes to the InnoDB redo log file.

  •  Innodb_num_open_files

    The number of files InnoDB currently holds open.

  •  Innodb_os_log_fsyncs

    The number of fsync() writes done to the InnoDB redo log files.

  •  Innodb_os_log_pending_fsyncs

    The number of pending fsync() operations for the InnoDB redo log files.

  •  Innodb_os_log_pending_writes

    The number of pending writes to the InnoDB redo log files.

  •  Innodb_os_log_written

    The number of bytes written to the InnoDB redo log files.

  •  Innodb_page_size

    The compiled-in InnoDB page size (default 16KB). Many values are counted in pages; the page size enables them to be easily converted to bytes.

  •  Innodb_pages_created

    The number of pages created by operations on InnoDB tables.

  •  Innodb_pages_read

    The number of pages read by operations on InnoDB tables.

  •  Innodb_pages_written

    The number of pages written by operations on InnoDB tables.

  •  Innodb_row_lock_current_waits

    The number of row locks currently being waited for by operations on InnoDB tables.

  •  Innodb_row_lock_time

    The total time spent in acquiring row locks for InnoDB tables, in milliseconds.

  •  Innodb_row_lock_time_avg

    The average time to acquire a row lock for InnoDB tables, in milliseconds.

  •  Innodb_row_lock_time_max

    The maximum time to acquire a row lock for InnoDB tables, in milliseconds.

  •  Innodb_row_lock_waits

    The number of times operations on InnoDB tables had to wait for a row lock.

  •  Innodb_rows_deleted

    The number of rows deleted from InnoDB tables.

  •  Innodb_rows_inserted

    The number of rows inserted into InnoDB tables.

  •  Innodb_rows_read

    The number of rows read from InnoDB tables.

  •  Innodb_rows_updated

    The number of rows updated in InnoDB tables.

  •  Innodb_truncated_status_writes

    The number of times output from the SHOW ENGINE INNODB STATUS statement has been truncated.

  •  Key_blocks_not_flushed

    The number of key blocks in the MyISAM key cache that have changed but have not yet been flushed to disk.

  •  Key_blocks_unused

    The number of unused blocks in the MyISAM key cache. You can use this value to determine how much of the key cache is in use; see the discussion of key_buffer_size in Section 5.1.4, “Server System Variables”.

  •  Key_blocks_used

    The number of used blocks in the MyISAM 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_requests

    The number of requests to read a key block from the MyISAM key cache.

  •  Key_reads

    The number of physical reads of a key block from disk into the MyISAM key cache. If Key_reads is large, then yourkey_buffer_size value is probably too small. The cache miss rate can be calculated asKey_reads/Key_read_requests.

  •  Key_write_requests

    The number of requests to write a key block to the MyISAM key cache.

  •  Key_writes

    The number of physical writes of a key block from the MyISAM key cache to disk.

  •  Last_query_cost

    The 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_cost has session scope.

    The Last_query_cost value can be computed accurately only for simple flat queries, not complex queries such as those with subqueries or UNION. For the latter, the value is set to 0.

  •  Last_query_partial_plans

    The number of iterations the query optimizer made in execution plan construction for the previous query.Last_query_cost has session scope.

  •  Max_statement_time_exceeded

    The number of SELECT statements for which the execution timeout was exceeded. This variable was added in MySQL 5.7.4.

  •  Max_statement_time_set

    The number of SELECT statements for which a nonzero execution timeout was set. This includes statements that include a nonzero MAX_STATEMENT_TIME option, and statements that include no such option but execute while the timeout indicated by the max_statement_time system variable is nonzero. This variable was added in MySQL 5.7.4.

  •  Max_statement_time_set_failed

    The number of SELECT statements for which the attempt to set an execution timeout failed. This variable was added in MySQL 5.7.4.

  •  Max_used_connections

    The maximum number of connections that have been in use simultaneously since the server started.

  •  Max_used_connections_time

    The time at which Max_used_connections reached its current value. This variable was added in MySQL 5.7.5.

  •  Not_flushed_delayed_rows

    In MySQL 5.7, this status variable is deprecated (because DELAYED inserts are not supported), and will be removed in a future release.

  •  Open_files

    The 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_streams

    The number of streams that are open (used mainly for logging).

  •  Open_table_definitions

    The number of cached .frm files.

  •  Open_tables

    The number of tables that are open.

  •  Opened_files

    The number of files that have been opened with my_open() (a mysys library function). Parts of the server that open files without using this function do not increment the count.

  •  Opened_table_definitions

    The number of .frm files that have been cached.

  •  Opened_tables

    The number of tables that have been opened. If Opened_tables is big, your table_open_cache value is probably too small.

  • Performance_schema_xxx

    Performance Schema status variables are listed in Section 20.13, “Performance Schema Status Variables”. These variables provide information about instrumentation that could not be loaded or created due to memory constraints.

  •  Prepared_stmt_count

    The current number of prepared statements. (The maximum number of statements is given by themax_prepared_stmt_count system variable.)

  •  Qcache_free_blocks

    The number of free memory blocks in the query cache.

  •  Qcache_free_memory

    The amount of free memory for the query cache.

  •  Qcache_hits

    The number of query cache hits.

  •  Qcache_inserts

    The number of queries added to the query cache.

  •  Qcache_lowmem_prunes

    The number of queries that were deleted from the query cache because of low memory.

  •  Qcache_not_cached

    The number of noncached queries (not cacheable, or not cached due to the query_cache_type setting).

  •  Qcache_queries_in_cache

    The number of queries registered in the query cache.

  •  Qcache_total_blocks

    The total number of blocks in the query cache.

  •  Queries

    The number of statements executed by the server. This variable includes statements executed within stored programs, unlike the Questions variable. It does not count COM_PING or COM_STATISTICS commands.

  •  Questions

    The 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 Queries variable. This variable does not countCOM_PINGCOM_STATISTICSCOM_STMT_PREPARECOM_STMT_CLOSE, or COM_STMT_RESET commands.

  •  Rpl_semi_sync_master_clients

    The 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_time

    The 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_time

    The 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_waits

    The 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_times

    The 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_tx

    The 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_status

    Whether semisynchronous replication currently is operational on the master. The value is ON if the plugin has been enabled and a commit acknowledgment has occurred. It is OFF if 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_failures

    The 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_time

    The 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_time

    The 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_waits

    The 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_backtraverse

    The 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_sessions

    The 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_tx

    The 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_status

    Whether semisynchronous replication currently is operational on the slave. This is ON if the plugin has been enabled and the slave I/O thread is running, OFF otherwise.

    This variable is available only if the slave-side semisynchronous replication plugin is installed.

  •  Rsa_public_key

    The RSA public key value used by the sha256_password authentication plugin. The value is nonempty only if the server successfully initializes the private and public keys in the files named by thesha256_password_private_key_path and sha256_password_public_key_path system variables. The value of Rsa_public_key comes from the latter file.

    For information about sha256_password, see Section 6.3.9.4, “The SHA-256 Authentication Plugin”.

    This variable is available only if MySQL was built using OpenSSL.

  •  Select_full_join

    The 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_join

    The number of joins that used a range search on a reference table.

  •  Select_range

    The 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_check

    The 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_scan

    The number of joins that did a full scan of the first table.

  •  Slave_heartbeat_period

    Shows the replication heartbeat interval (in seconds) on a replication slave.

  •  Slave_last_heartbeat

    Shows when the most recent heartbeat signal was received by a replication slave, as a TIMESTAMP value.

  •  Slave_open_temp_tables

    The 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 Section 16.4.1.22, “Replication and Temporary Tables”.

  •  Slave_received_heartbeats

    This 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 TO statement was issued.

  •  Slave_retried_transactions

    The total number of times since startup that the replication slave SQL thread has retried transactions.

  •  Slave_running

    This is ON if 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 is OFF.

  •  Slow_launch_threads

    The number of threads that have taken more than slow_launch_time seconds to create.

    This variable is not meaningful in the embedded server (libmysqld) and as of MySQL 5.7.2 is no longer visible within the embedded server.

  •  Slow_queries

    The number of queries that have taken more than long_query_time seconds. This counter increments regardless of whether the slow query log is enabled. For information about that log, see Section 5.2.5, “The Slow Query Log”.

  •  Sort_merge_passes

    The 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_size system variable.

  •  Sort_range

    The number of sorts that were done using ranges.

  •  Sort_rows

    The number of sorted rows.

  •  Sort_scan

    The number of sorts that were done by scanning the table.

  •  Ssl_accept_renegotiates

    The number of negotiates needed to establish the connection.

  •  Ssl_accepts

    The number of accepted SSL connections.

  •  Ssl_callback_cache_hits

    The number of callback cache hits.

  •  Ssl_cipher

    The current SSL cipher (empty for non-SSL connections).

  •  Ssl_cipher_list

    The list of possible SSL ciphers.

  •  Ssl_client_connects

    The number of SSL connection attempts to an SSL-enabled master.

  •  Ssl_connect_renegotiates

    The number of negotiates needed to establish the connection to an SSL-enabled master.

  •  Ssl_ctx_verify_depth

    The SSL context verification depth (how many certificates in the chain are tested).

  •  Ssl_ctx_verify_mode

    The SSL context verification mode.

  •  Ssl_default_timeout

    The default SSL timeout.

  •  Ssl_finished_accepts

    The number of successful SSL connections to the server.

  •  Ssl_finished_connects

    The number of successful slave connections to an SSL-enabled master.

  •  Ssl_server_not_after

    The last date for which the SSL certificate is valid.

  •  Ssl_server_not_before

    The first date for which the SSL certificate is valid.

  •  Ssl_session_cache_hits

    The number of SSL session cache hits.

  •  Ssl_session_cache_misses

    The number of SSL session cache misses.

  •  Ssl_session_cache_mode

    The SSL session cache mode.

  •  Ssl_session_cache_overflows

    The number of SSL session cache overflows.

  •  Ssl_session_cache_size

    The SSL session cache size.

  •  Ssl_session_cache_timeouts

    The number of SSL session cache timeouts.

  •  Ssl_sessions_reused

    How many SSL connections were reused from the cache.

  •  Ssl_used_session_cache_entries

    How many SSL session cache entries were used.

  •  Ssl_verify_depth

    The verification depth for replication SSL connections.

  •  Ssl_verify_mode

    The verification mode for replication SSL connections.

  •  Ssl_version

    The SSL protocol version of the connection.

  •  Table_locks_immediate

    The number of times that a request for a table lock could be granted immediately.

  •  Table_locks_waited

    The 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.

  •  Table_open_cache_hits

    The number of hits for open tables cache lookups.

  •  Table_open_cache_misses

    The number of misses for open tables cache lookups.

  •  Table_open_cache_overflows

    The number of overflows for the open tables cache. This is the number of times, after a table is opened or closed, a cache instance has an unused entry and the size of the instance is larger than table_open_cache /table_open_cache_instances.

  •  Tc_log_max_pages_used

    For 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_used and Tc_log_page_size is 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-size option. 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. (InnoDB is the only applicable engine.)

  •  Tc_log_page_size

    The 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_waits

    For 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-size option). 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_cached

    The number of threads in the thread cache.

    This variable is not meaningful in the embedded server (libmysqld) and as of MySQL 5.7.2 is no longer visible within the embedded server.

  •  Threads_connected

    The number of currently open connections.

  •  Threads_created

    The number of threads created to handle connections. If Threads_created is big, you may want to increase thethread_cache_size value. The cache miss rate can be calculated as Threads_created/Connections.

  •  Threads_running

    The number of threads that are not sleeping.

  •  Uptime

    The number of seconds that the server has been up.

  •  Uptime_since_flush_status

    The number of seconds since the most recent FLUSH STATUS statement.

Previous / Next / Up / Table of Contents

User Comments

Posted by Demetrios Stavrinos on July 22 2004 12:27pm[Delete] [Edit]

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 10:23am[Delete] [Edit]

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 9:23pm[Delete] [Edit]

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 4:34am[Delete] [Edit]

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.
0 0