MySQL 服务器维护许多状态变量,这些变量提供有关其操作的信息。您可以使用 SHOW [GLOBAL | SESSION]
STATUS 语句查看这些变量及其值(参见 第 15.7.7.37 节,“SHOW STATUS 语句”)。可选的 GLOBAL 关键字会汇总所有连接的值,而 SESSION 则显示当前连接的值。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 15.7.7.37, “SHOW STATUS Statement”).
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 |
+-----------------------------------+------------+
许多状态变量会被 FLUSH STATUS 语句重置为 0。Many status variables are reset to 0 by the
FLUSH STATUS statement.
本节提供每个状态变量的描述。有关状态变量的摘要,请参见 第 7.1.6 节,“服务器状态变量参考”。有关 NDB Cluster 特定状态变量的信息,请参见 第 25.4.3.9.3 节,“NDB Cluster 状态变量”。This section provides a description of each status variable. For a status variable summary, see Section 7.1.6, “Server Status Variable Reference”. For information about status variables specific to NDB Cluster, see Section 25.4.3.9.3, “NDB Cluster Status Variables”.
状态变量具有以下含义。The status variables have the following meanings.
Aborted_clientsAborted_clients由于客户端在未正确关闭连接的情况下终止,导致的连接中断次数。参见 B.3.2.9 节,“通信错误和中止连接”。The number of connections that were aborted because the client died without closing the connection properly. See Section B.3.2.9, “Communication Errors and Aborted Connections”.
Aborted_connectsAborted_connects尝试连接到 MySQL 服务器失败的次数。参见 B.3.2.9 节,“通信错误和中止连接”。The number of failed attempts to connect to the MySQL server. See Section B.3.2.9, “Communication Errors and Aborted Connections”.
有关更多连接相关的信息,请查看
Connection_errors_状态变量以及xxxhost_cache表。For additional connection-related information, check theConnection_errors_status variables and thexxxhost_cachetable.Authentication_ldap_sasl_supported_methodsAuthentication_ldap_sasl_supported_methods实现 SASL LDAP 身份验证的
authentication_ldap_sasl插件支持多种身份验证方法,但根据主机系统配置,它们可能并非全部可用。Authentication_ldap_sasl_supported_methods变量提供对支持方法的可发现性。其值是由空格分隔的支持方法名称组成的字符串。例如:"SCRAM-SHA 1 SCRAM-SHA-256 GSSAPI"Theauthentication_ldap_saslplugin that implements SASL LDAP authentication supports multiple authentication methods, but depending on host system configuration, they might not all be available. TheAuthentication_ldap_sasl_supported_methodsvariable provides discoverability for the supported methods. Its value is a string consisting of supported method names separated by spaces. Example:"SCRAM-SHA 1 SCRAM-SHA-256 GSSAPI"Binlog_cache_disk_useBinlog_cache_disk_use使用临时二进制日志缓存但超过
binlog_cache_size的值,并使用临时文件存储事务中的语句的事务数量。The number of transactions that used the temporary binary log cache but that exceeded the value ofbinlog_cache_sizeand used a temporary file to store statements from the transaction.非事务性语句导致二进制日志事务缓存写入磁盘的次数在
Binlog_stmt_cache_disk_use状态变量中单独跟踪。The number of nontransactional statements that caused the binary log transaction cache to be written to disk is tracked separately in theBinlog_stmt_cache_disk_usestatus variable.Acl_cache_items_countAcl_cache_items_count缓存的权限对象数量。每个对象都是用户及其激活角色的权限组合。The number of cached privilege objects. Each object is the privilege combination of a user and its active roles.
Binlog_cache_useBinlog_cache_use使用二进制日志缓存的事务数量。The number of transactions that used the binary log cache.
使用二进制日志语句缓存的非事务语句数量,但超过了
binlog_stmt_cache_size的值,并使用临时文件来存储这些语句。The number of nontransaction statements that used the binary log statement cache but that exceeded the value ofbinlog_stmt_cache_sizeand used a temporary file to store those statements.使用二进制日志语句缓存的非事务性语句数量。The number of nontransactional statements that used the binary log statement cache.
从所有客户端接收到的字节数。The number of bytes received from all clients.
发送给所有客户端的字节数。The number of bytes sent to all clients.
Caching_sha2_password_rsa_public_keyCaching_sha2_password_rsa_public_key由
caching_sha2_password认证插件使用的公钥,用于基于 RSA 密钥对的密码交换。只有在服务器成功初始化由caching_sha2_password_private_key_path和caching_sha2_password_public_key_path系统变量指定的文件中的私钥和公钥时,该值才非空。Caching_sha2_password_rsa_public_key的值来自后者的文件。The public key used by thecaching_sha2_passwordauthentication plugin for RSA key pair-based password exchange. The value is nonempty only if the server successfully initializes the private and public keys in the files named by thecaching_sha2_password_private_key_pathandcaching_sha2_password_public_key_pathsystem variables. The value ofCaching_sha2_password_rsa_public_keycomes from the latter file.Com_语句计数器变量表示每个xxxxxx语句已执行的次数。每种类型的语句都有一个状态变量。例如,Com_delete和Com_update分别统计DELETE和UPDATE语句的次数。Com_delete_multi和Com_update_multi类似,但适用于使用多表语法的DELETE和UPDATE语句。TheCom_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_updatecountDELETEandUPDATEstatements, respectively.Com_delete_multiandCom_update_multiare similar but apply toDELETEandUPDATEstatements that use multiple-table syntax.即使预处理语句的参数未知或执行过程中发生错误,所有
Com_stmt_变量也会增加。换句话说,它们的值对应的是发出的请求数量,而不是成功完成的请求数量。例如,由于状态变量在每次服务器启动时初始化,并且不会在重启后保留,因此用于跟踪xxxRESTART和SHUTDOWN语句的Com_restart和Com_shutdown变量通常为零,但如果执行了RESTART或SHUTDOWN但失败,这些变量可能会非零。AllCom_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. For example, because status variables are initialized for each server startup and do not persist across restarts, thexxxCom_restartandCom_shutdownvariables that trackRESTARTandSHUTDOWNstatements normally have a value of zero, but can be nonzero ifRESTARTorSHUTDOWNstatements were executed but failed.Com_stmt_状态变量如下:ThexxxCom_stmt_status variables are as follows:xxxCom_stmt_prepareCom_stmt_executeCom_stmt_fetchCom_stmt_send_long_dataCom_stmt_resetCom_stmt_close
这些变量代表预处理语句命令。它们的名称指代网络层中使用的
COM_命令集。换句话说,每当执行诸如 mysql_stmt_prepare()、mysql_stmt_execute() 等预处理语句 API 调用时,它们的值会增加。然而,xxxCom_stmt_prepare、Com_stmt_execute和Com_stmt_close也会分别因PREPARE、EXECUTE或DEALLOCATE PREPARE而增加。此外,较旧的语句计数器变量Com_prepare_sql、Com_execute_sql和Com_dealloc_sql在执行PREPARE、EXECUTE和DEALLOCATE PREPARE语句时会增加。Com_stmt_fetch表示从游标获取数据时发出的网络往返总次数。Those variables stand for prepared statement commands. Their names refer to theCOM_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_reprepare表示语句被服务器自动重新准备的次数,例如在语句引用的表或视图的元数据发生变化后。重新准备操作会增加Com_stmt_reprepare,同时也会增加Com_stmt_prepare。Com_stmt_reprepareindicates the number of times statements were automatically reprepared by the server, for example, after metadata changes to tables or views referred to by the statement. A reprepare operation incrementsCom_stmt_reprepare, and alsoCom_stmt_prepare.Com_explain_other表示执行的EXPLAIN FOR CONNECTION语句的次数。详见 第 10.8.4 节,“获取指定连接的执行计划信息”。Com_explain_otherindicates the number ofEXPLAIN FOR CONNECTIONstatements executed. See Section 10.8.4, “Obtaining Execution Plan Information for a Named Connection”.Com_change_repl_filter表示执行的CHANGE REPLICATION FILTER语句的数量。Com_change_repl_filterindicates the number ofCHANGE REPLICATION FILTERstatements executed.客户端连接在客户端/服务器协议中是否使用压缩。Whether the client connection uses compression in the client/server protocol.
此状态变量已被弃用;预计将在 MySQL 的未来版本中移除。请参阅 配置遗留连接压缩。This status variable is deprecated; expect it to be removed in a future version of MySQL. See Configuring Legacy Connection Compression.
Compression_algorithmCompression_algorithm用于当前与服务器连接的压缩算法的名称。该值可以是
protocol_compression_algorithms系统变量允许的任何算法。例如,如果连接未使用压缩,则该值为uncompressed;如果连接使用zlib算法,则该值为zlib。The name of the compression algorithm in use for the current connection to the server. The value can be any algorithm permitted in the value of theprotocol_compression_algorithmssystem variable. For example, the value isuncompressedif the connection does not use compression, orzlibif the connection uses thezlibalgorithm.更多信息,请参阅 第 6.2.8 节,“连接压缩控制”。For more information, see Section 6.2.8, “Connection Compression Control”.
Compression_levelCompression_level当前连接到服务器使用的压缩级别。对于
zlib连接(默认的zlib算法压缩级别),该值为 6;对于zstd连接,该值为 1 到 22;对于uncompressed连接,该值为 0。The compression level in use for the current connection to the server. The value is 6 forzlibconnections (the defaultzlibalgorithm compression level), 1 to 22 forzstdconnections, and 0 foruncompressedconnections.更多信息,请参阅 第 6.2.8 节,“连接压缩控制”。For more information, see Section 6.2.8, “Connection Compression Control”.
Connection_errors_xxxConnection_errors_xxx这些变量提供有关客户端连接过程中发生的错误的信息。它们仅为全局变量,表示从所有主机的连接汇总的错误计数。这些变量跟踪主机缓存未计入的错误(参见第 7.1.12.3 节,“DNS 查找和主机缓存”),例如未与 TCP 连接相关的错误、连接过程非常早期(甚至在知道 IP 地址之前)发生的错误,或不针对任何特定 IP 地址的错误(例如内存不足情况)。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 7.1.12.3, “DNS Lookups 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).
Connection_errors_acceptConnection_errors_accept在监听端口调用
accept()时发生的错误数量。The number of errors that occurred during calls toaccept()on the listening port.Connection_errors_internalConnection_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_connectionsConnection_errors_max_connections由于服务器的
max_connections限制已达到而被拒绝的连接数。The number of connections refused because the servermax_connectionslimit was reached.Connection_errors_peer_addressConnection_errors_peer_address在搜索连接客户端 IP 地址时发生的错误数量。The number of errors that occurred while searching for connecting client IP addresses.
Connection_errors_selectConnection_errors_select在监听端口调用
select()或poll()时发生的错误次数。(此操作失败并不一定意味着客户端连接被拒绝。)The number of errors that occurred during calls toselect()orpoll()on the listening port. (Failure of this operation does not necessarily means a client connection was rejected.)Connection_errors_tcpwrapConnection_errors_tcpwrap被
libwrap库拒绝的连接次数。The number of connections refused by thelibwraplibrary.
对 MySQL 服务器的连接尝试次数(无论是否成功)。The number of connection attempts (successful or not) to the MySQL server.
Created_tmp_disk_tablesCreated_tmp_disk_tables服务器在执行语句时创建的内部磁盘临时表的数量。The number of internal on-disk temporary tables created by the server while executing statements.
您可以通过比较
Created_tmp_disk_tables和Created_tmp_tables的数值,来比较创建的内部磁盘临时表数量与创建的内部临时表总数。You can compare the number of internal on-disk temporary tables created to the total number of internal temporary tables created by comparingCreated_tmp_disk_tablesandCreated_tmp_tablesvalues.Note由于已知的限制,
Created_tmp_disk_tables不计算在内存映射文件中创建的磁盘临时表。默认情况下,TempTable 存储引擎的溢出机制会在内存映射文件中创建内部临时表。此行为由temptable_use_mmap变量控制。Due to a known limitation,Created_tmp_disk_tablesdoes not count on-disk temporary tables created in memory-mapped files. By default, the TempTable storage engine overflow mechanism creates internal temporary tables in memory-mapped files. This behavior is controlled by thetemptable_use_mmapvariable.另请参见 第 10.4.4 节,“MySQL 中的内部临时表使用”。See also Section 10.4.4, “Internal Temporary Table Use in MySQL”.
Created_tmp_filesCreated_tmp_filesmysqld创建了多少临时文件。How many temporary files mysqld has created.
Created_tmp_tablesCreated_tmp_tables服务器在执行语句时创建的内部临时表的数量。The number of internal temporary tables created by the server while executing statements.
您可以通过比较
Created_tmp_disk_tables和Created_tmp_tables的数值,来比较创建的内部磁盘临时表数量与创建的内部临时表总数。You can compare the number of internal on-disk temporary tables created to the total number of internal temporary tables created by comparingCreated_tmp_disk_tablesandCreated_tmp_tablesvalues.另请参见 第 10.4.4 节,“MySQL 中的内部临时表使用”。See also Section 10.4.4, “Internal Temporary Table Use in MySQL”.
每次调用
SHOW STATUS语句时,都会使用一个内部临时表,并增加全局Created_tmp_tables值。Each invocation of theSHOW STATUSstatement uses an internal temporary table and increments the globalCreated_tmp_tablesvalue.服务器用于新连接的 SSL 上下文中活动的
ssl_ca值。如果系统变量已更改,但尚未执行ALTER INSTANCE RELOAD TLS来根据上下文相关的系统变量值重新配置 SSL 上下文并更新相应的状态变量,则该上下文值可能与当前的ssl_ca系统变量值不同。(这种值的潜在差异适用于每一对相应的上下文相关系统变量和状态变量。参见 加密连接的服务器端运行时配置与监控。)The activessl_cavalue in the SSL context that the server uses for new connections. This context value may differ from the currentssl_casystem variable value if the system variable has been changed butALTER INSTANCE RELOAD TLShas not subsequently been executed to reconfigure the SSL context from the context-related system variable values and update the corresponding status variables. (This potential difference in values applies to each corresponding pair of context-related system and status variables. See Server-Side Runtime Configuration and Monitoring for Encrypted Connections.)Current_tls_状态变量的值也可以通过性能模式xxxtls_channel_status表获得。请参阅 第 29.12.22.9 节,“tls_channel_status 表”。TheCurrent_tls_status variable values are also available through the Performance Schemaxxxtls_channel_statustable. See Section 29.12.22.9, “The tls_channel_status Table”.Current_tls_capathCurrent_tls_capath服务器用于新连接的 TLS 上下文中活动的
ssl_capath值。有关此状态变量与其对应系统变量之间关系的说明,请参阅Current_tls_ca的描述。The activessl_capathvalue in the TLS context that the server uses for new connections. For notes about the relationship between this status variable and its corresponding system variable, see the description ofCurrent_tls_ca.Current_tls_certCurrent_tls_cert服务器用于新连接的 TLS 上下文中的活动
ssl_cert值。有关此状态变量与其对应的系统变量之间关系的说明,请参见Current_tls_ca的描述。The activessl_certvalue in the TLS context that the server uses for new connections. For notes about the relationship between this status variable and its corresponding system variable, see the description ofCurrent_tls_ca.Current_tls_cipherCurrent_tls_cipher服务器用于新连接的 TLS 上下文中的活动
ssl_cipher值。有关此状态变量与其对应的系统变量之间关系的说明,请参见Current_tls_ca的描述。The activessl_ciphervalue in the TLS context that the server uses for new connections. For notes about the relationship between this status variable and its corresponding system variable, see the description ofCurrent_tls_ca.Current_tls_ciphersuitesCurrent_tls_ciphersuites服务器用于新连接的 TLS 上下文中的活动
tls_ciphersuites值。关于此状态变量与其对应的系统变量之间关系的说明,请参见Current_tls_ca的描述。The activetls_ciphersuitesvalue in the TLS context that the server uses for new connections. For notes about the relationship between this status variable and its corresponding system variable, see the description ofCurrent_tls_ca.Current_tls_crlCurrent_tls_crl服务器在新连接中使用的 TLS 上下文中活动的
ssl_crl值。有关此状态变量与其相应系统变量之间关系的说明,请参见Current_tls_ca的描述。The activessl_crlvalue in the TLS context that the server uses for new connections. For notes about the relationship between this status variable and its corresponding system variable, see the description ofCurrent_tls_ca.Note当你重新加载 TLS 上下文时,OpenSSL 会在此过程中重新加载包含 CRL(证书撤销列表)的文件。如果 CRL 文件较大,服务器会分配一大块内存(文件大小的十倍),在新实例加载而旧实例尚未释放时,这块内存会加倍。大块内存释放后,进程常驻内存不会立即减少,因此如果你使用大型 CRL 文件反复执行
ALTER INSTANCE RELOAD TLS语句,可能会导致进程常驻内存使用量增加。When you reload the TLS context, OpenSSL reloads the file containing the CRL (certificate revocation list) as part of the process. If the CRL file is large, the server allocates a large chunk of memory (ten times the file size), which is doubled while the new instance is being loaded and the old one has not yet been released. The process resident memory is not immediately reduced after a large allocation is freed, so if you issue theALTER INSTANCE RELOAD TLSstatement repeatedly with a large CRL file, the process resident memory usage may grow as a result of this.服务器用于新连接的 TLS 上下文中活动的
ssl_crlpath值。有关此状态变量与其对应系统变量之间关系的说明,请参阅Current_tls_ca的描述。The activessl_crlpathvalue in the TLS context that the server uses for new connections. For notes about the relationship between this status variable and its corresponding system variable, see the description ofCurrent_tls_ca.服务器用于新连接的 TLS 上下文中的活动
ssl_key值。有关此状态变量与其对应的系统变量之间关系的说明,请参见Current_tls_ca的描述。The activessl_keyvalue in the TLS context that the server uses for new connections. For notes about the relationship between this status variable and its corresponding system variable, see the description ofCurrent_tls_ca.服务器用于新连接的 TLS 上下文中的活动
tls_version值。关于此状态变量与其对应系统变量之间关系的说明,请参见Current_tls_ca的描述。The activetls_versionvalue in the TLS context that the server uses for new connections. For notes about the relationship between this status variable and its corresponding system variable, see the description ofCurrent_tls_ca.此状态变量已被弃用(因为不支持
DELAYED插入);预计将在未来版本中移除。This status variable is deprecated (becauseDELAYEDinserts are not supported); expect it to be removed in a future release.此状态变量已被弃用(因为不支持
DELAYED插入);预计将在未来版本中移除。This status variable is deprecated (becauseDELAYEDinserts are not supported); expect it to be removed in a future release.此状态变量已被弃用(因为不支持
DELAYED插入);预计将在未来版本中移除。This status variable is deprecated (becauseDELAYEDinserts are not supported); expect it to be removed in a future release.Deprecated_use_i_s_processlist_countDeprecated_use_i_s_processlist_count自上次重启以来,访问
information_schema.processlist表的次数。How many times theinformation_schema.processlisttable has been accessed since the last restart.Deprecated_use_i_s_processlist_last_timestampDeprecated_use_i_s_processlist_last_timestamp自上次重启以来,指示最后一次访问
information_schema.processlist表的时间戳。显示自 Unix 纪元以来的微秒数。A timestamp indicating the last time theinformation_schema.processlisttable has been accessed since the last restart. Shows microseconds since the Unix Epoch.最近一次对
dragnet.log_error_filter_rules系统变量的赋值结果,如果没有发生过赋值则为空。The result of the most recent assignment to thedragnet.log_error_filter_rulessystem variable, empty if no such assignment has occurred.Error_log_buffered_bytesError_log_buffered_bytesPerformance Schema
error_log表当前使用的字节数。这个值有可能会减少,例如,如果新事件无法适应,必须丢弃旧事件,但新事件比旧事件小。The number of bytes currently used in the Performance Schemaerror_logtable. It is possible for the value to decrease, for example, if a new event cannot fit until discarding an old event, but the new event is smaller than the old one.Error_log_buffered_eventsError_log_buffered_events当前存在于性能模式
error_log表中的事件数量。与Error_log_buffered_bytes一样,值可能会减少。The number of events currently present in the Performance Schemaerror_logtable. As withError_log_buffered_bytes, it is possible for the value to decrease.Error_log_expired_eventsError_log_expired_events从性能模式
error_log表中丢弃的事件数量,以为新事件腾出空间。The number of events discarded from the Performance Schemaerror_logtable to make room for new events.Error_log_latest_writeError_log_latest_write最后一次写入 Performance Schema
error_log表的时间。The time of the last write to the Performance Schemaerror_logtable.服务器刷新表的次数,无论是因为用户执行了
FLUSH TABLES语句,还是由于内部服务器操作引起的。收到COM_REFRESH数据包时,也会增加此计数。这与Com_flush不同,后者表示已经执行了多少个FLUSH语句,无论是FLUSH TABLES,FLUSH LOGS,等等。The number of times the server flushes tables, whether because a user executed aFLUSH 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.所有用户连接到服务器所使用的内存。系统线程或 MySQL 根账户使用的内存也包含在总量内,但这些线程或用户不会因内存使用而被断开连接。除非启用了
global_connection_memory_tracking(默认禁用),否则不会计算此内存。性能模式也必须启用。The memory used by all user connections to the server. Memory used by system threads or by the MySQL root account is included in the total, but such threads or users are not subject to disconnection due to memory usage. This memory is not calculated unlessglobal_connection_memory_trackingis enabled (disabled by default). The Performance Schema must also be enabled.您可以通过设置
connection_memory_chunk_size(间接地)控制此变量更新的频率。You can control (indirectly) the frequency with which this variable is updated by settingconnection_memory_chunk_size.从表中删除行的次数。The number of times that rows have been deleted from tables.
服务器在每次调用其
external_lock()函数时都会增加该变量,该函数通常在访问表实例的开始和结束时调用。不同的存储引擎可能有所不同。例如,可以使用此变量来发现访问分区表的语句在加锁之前修剪了多少分区:检查该语句的计数器增加了多少,减去 2(表本身的 2 次调用),然后除以 2 就能得到被锁定的分区数。The server increments this variable for each call to itsexternal_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.服务器使用存储引擎自身的多范围读取实现进行表访问的次数。The number of times the server uses a storage engine's own Multi-Range Read implementation for table access.
用于两阶段提交操作准备阶段的计数器。A counter for the prepare phase of two-phase commit operations.
索引中首次条目的读取次数。如果该值较高,则表明服务器正在执行大量全索引扫描(例如,
SELECT col1 FROM foo,假设col1已建索引)。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 thatcol1is indexed).基于键读取行的请求数量。如果该值很高,这说明您的表格已经针对查询进行了适当的索引。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.
读取索引中最后一个键的请求次数。使用
ORDER BY时,服务器会先发送一个首键请求,然后发送多个下一个键请求;而使用ORDER BY DESC时,服务器会先发送一个末键请求,然后发送多个上一个键请求。The number of requests to read the last key in an index. WithORDER BY, the server issues a first-key request followed by several next-key requests, whereas withORDER BY DESC, the server issues a last-key request followed by several previous-key requests.按键顺序读取下一行的请求次数。如果您在查询具有范围约束的索引列,或者正在进行索引扫描,则此值会增加。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.
按键顺序读取前一行的请求次数。这种读取方法主要用于优化
ORDER BY ... DESC。The number of requests to read the previous row in key order. This read method is mainly used to optimizeORDER BY ... DESC.基于固定位置读取行的请求数量。如果您执行大量需要对结果进行排序的查询,该值会很高。您可能有许多查询需要 MySQL 扫描整个表,或者有未正确使用键的连接。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.
读取数据文件中下一行的请求次数。如果您进行大量表扫描,该值会很高。通常,这表明您的表没有正确建立索引,或者您的查询没有编写为利用已有的索引。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.
请求存储引擎执行回滚操作的次数。The number of requests for a storage engine to perform a rollback operation.
请求存储引擎设置保存点的次数。The number of requests for a storage engine to place a savepoint.
存储引擎回滚到保存点的请求次数。The number of requests for a storage engine to roll back to a savepoint.
更新表中某一行的请求数量。The number of requests to update a row in a table.
向表中插入一行的请求数量。The number of requests to insert a row in a table.
Innodb_buffer_pool_dump_status记录
InnoDB缓冲池 中持有的 页面 的操作进度,该操作由设置innodb_buffer_pool_dump_at_shutdown或innodb_buffer_pool_dump_now触发。The progress of an operation to record the pages held in theInnoDBbuffer pool, triggered by the setting ofinnodb_buffer_pool_dump_at_shutdownorinnodb_buffer_pool_dump_now.有关相关信息和示例,请参见 第 17.8.3.6 节,“保存和恢复缓冲池状态”。For related information and examples, see Section 17.8.3.6, “Saving and Restoring the Buffer Pool State”.
Innodb_buffer_pool_load_statusInnodb_buffer_pool_load_status通过读取一组对应于之前时间点的页面来热身
InnoDB缓冲池操作的进度,由设置innodb_buffer_pool_load_at_startup或innodb_buffer_pool_load_now触发。如果该操作引入过多开销,可以通过设置innodb_buffer_pool_load_abort来取消它。The progress of an operation to warm up theInnoDBbuffer pool by reading in a set of pages corresponding to an earlier point in time, triggered by the setting ofinnodb_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.有关相关信息和示例,请参见 第 17.8.3.6 节,“保存和恢复缓冲池状态”。For related information and examples, see Section 17.8.3.6, “Saving and Restoring the Buffer Pool State”.
Innodb_buffer_pool_bytes_dataInnodb_buffer_pool_bytes_dataInnoDB缓冲池 中包含数据的字节总数。该数字包括脏页和干净页。对于比Innodb_buffer_pool_pages_data更准确的内存使用计算,当压缩表导致缓冲池包含不同大小的页时。The total number of bytes in theInnoDBbuffer pool containing data. The number includes both dirty and clean pages. For more accurate memory usage calculations than withInnodb_buffer_pool_pages_data, when compressed tables cause the buffer pool to hold pages of different sizes.Innodb_buffer_pool_pages_dataInnodb_buffer_pool_pages_dataInnoDB缓冲池 中包含数据的 页 数量。该数量包括 脏页 和干净页。当使用 压缩表 时,报告的Innodb_buffer_pool_pages_data值可能大于Innodb_buffer_pool_pages_total(错误 #59550)。The number of pages in theInnoDBbuffer pool containing data. The number includes both dirty and clean pages. When using compressed tables, the reportedInnodb_buffer_pool_pages_datavalue may be larger thanInnodb_buffer_pool_pages_total(Bug #59550).Innodb_buffer_pool_bytes_dirtyInnodb_buffer_pool_bytes_dirty当前
InnoDB缓冲池 中 脏页 持有的总字节数。相比Innodb_buffer_pool_pages_dirty,在 压缩 表导致缓冲池持有不同大小的页时,更适用于更准确的内存使用计算。The total current number of bytes held in dirty pages in theInnoDBbuffer pool. For more accurate memory usage calculations than withInnodb_buffer_pool_pages_dirty, when compressed tables cause the buffer pool to hold pages of different sizes.Innodb_buffer_pool_pages_dirtyInnodb_buffer_pool_pages_dirtyInnoDB缓冲池中当前的脏页数量。The current number of dirty pages in theInnoDBbuffer pool.Innodb_buffer_pool_pages_flushedInnodb_buffer_pool_pages_flushed请求将
InnoDB缓冲池 中的 页 刷新 的次数。The number of requests to flush pages from theInnoDBbuffer pool.Innodb_buffer_pool_pages_freeInnodb_buffer_pool_pages_freeInnoDB缓冲池 中空闲 页 的数量。The number of free pages in theInnoDBbuffer pool.Innodb_buffer_pool_pages_latchedInnodb_buffer_pool_pages_latchedInnoDB缓冲池 中已锁定的 页 的数量。这些页面当前正在被读取或写入,或者由于某些其他原因无法被 刷新 或移除。计算此变量开销较大,因此仅在服务器构建时定义了UNIV_DEBUG系统时可用。The number of latched pages in theInnoDBbuffer 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缓冲池中因分配给管理开销(例如行锁或自适应哈希索引)而被占用的页数。此值也可以通过计算Innodb_buffer_pool_pages_total−Innodb_buffer_pool_pages_free−Innodb_buffer_pool_pages_data得出。当使用压缩表时,Innodb_buffer_pool_pages_misc可能会报告超出范围的值(Bug #59550)。The number of pages in theInnoDBbuffer 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. When using compressed tables,Innodb_buffer_pool_pages_miscmay report an out-of-bounds value (Bug #59550).Innodb_buffer_pool_pages_totalInnodb_buffer_pool_pages_totalInnoDB缓冲池 的总大小,以 页 为单位。当使用 压缩表 时,报告的Innodb_buffer_pool_pages_data值可能大于Innodb_buffer_pool_pages_total(Bug #59550)The total size of theInnoDBbuffer pool, in pages. When using compressed tables, the reportedInnodb_buffer_pool_pages_datavalue may be larger thanInnodb_buffer_pool_pages_total(Bug #59550)Innodb_buffer_pool_read_aheadInnodb_buffer_pool_read_ahead由预读后台线程读取到
InnoDB缓冲池中的页面数量。The number of pages read into theInnoDBbuffer pool by the read-ahead background thread.Innodb_buffer_pool_read_ahead_evictedInnodb_buffer_pool_read_ahead_evicted由预读后台线程读取到
InnoDB缓冲池中但随后被逐出而未被查询访问的页数 without having been accessed by queries.The number of pages read into theInnoDBbuffer pool by the read-ahead background thread that were subsequently evicted without having been accessed by queries.Innodb_buffer_pool_read_ahead_rndInnodb_buffer_pool_read_ahead_rnd由“随机”由...发起的预读
InnoDB。当查询以随机顺序扫描表的大部分数据时会发生这种情况。The number of “random” read-aheads initiated byInnoDB. This happens when a query scans a large portion of a table but in random order.Innodb_buffer_pool_read_requests逻辑读取请求的数量。The number of logical read requests.
无法从
InnoDB满足的逻辑读取次数,只能直接从磁盘读取。缓冲池尝试连接被锁定用户帐户的次数。有关帐户锁定和解锁的信息,请参见The number of logical reads thatInnoDBcould not satisfy from the buffer pool, and had to read directly from disk.Innodb_buffer_pool_resize_status通过动态设置
innodb_buffer_pool_size参数触发的动态调整InnoDB缓冲池 大小的操作状态。innodb_buffer_pool_size参数是动态的,这允许您在不重启服务器的情况下调整缓冲池大小。有关相关信息,请参见 在线配置 InnoDB 缓冲池大小。The status of an operation to resize theInnoDBbuffer pool dynamically, triggered by setting theinnodb_buffer_pool_sizeparameter dynamically. Theinnodb_buffer_pool_sizeparameter is dynamic, which allows you to resize the buffer pool without restarting the server. See Configuring InnoDB Buffer Pool Size Online for related information.Innodb_buffer_pool_resize_status_code报告用于跟踪在线缓冲池调整操作的状态代码。每个状态代码表示调整操作中的一个阶段。状态代码包括:Reports status codes for tracking online buffer pool resizing operations. Each status code represents a stage in a resizing operation. Status codes include:
0:没有进行调整操作0: No Resize operation in progress
1:开始调整1: Starting Resize
2:禁用 AHI(自适应哈希索引)2: Disabling AHI (Adaptive Hash Index)
3:回收块3: Withdrawing Blocks
4:获取全局锁4: Acquiring Global Lock
5:调整池大小5: Resizing Pool
6:调整哈希6: Resizing Hash
7:调整失败7: Resizing Failed
您可以将此状态变量与
Innodb_buffer_pool_resize_status_progress结合使用,以跟踪调整操作每个阶段的进度。Innodb_buffer_pool_resize_status_progress变量报告一个百分比值,表示当前阶段的进度。You can use this status variable in conjunction withInnodb_buffer_pool_resize_status_progressto track the progress of each stage of a resizing operation. TheInnodb_buffer_pool_resize_status_progressvariable reports a percentage value indicating the progress of the current stage.有关更多信息,请参见 监控在线缓冲池调整进度。For more information, see Monitoring Online Buffer Pool Resizing Progress.
Innodb_buffer_pool_resize_status_progressInnodb_buffer_pool_resize_status_progress报告一个百分比值,指示在线缓冲池调整大小操作当前阶段的进度。该变量与
Innodb_buffer_pool_resize_status_code一起使用,后者报告一个状态代码,指示在线缓冲池调整大小操作的当前阶段。Reports a percentage value indicating the progress of the current stage of an online buffer pool resizing operation. This variable is used in conjunction withInnodb_buffer_pool_resize_status_code, which reports a status code indicating the current stage of an online buffer pool resizing operation.在处理每个缓冲池实例后,百分比值会更新。当状态代码(由
Innodb_buffer_pool_resize_status_code报告)从一种状态变为另一种状态时,百分比值会重置为 0。The percentage value is updated after each buffer pool instance is processed. As the status code (reported byInnodb_buffer_pool_resize_status_code) changes from one status to another, the percentage value is reset to 0.有关相关信息,请参见 监控在线缓冲池调整进度。For related information, see Monitoring Online Buffer Pool Resizing Progress.
Innodb_buffer_pool_wait_freeInnodb_buffer_pool_wait_free通常,对
InnoDB缓冲池 的写入会在后台进行。当InnoDB需要读取或创建一个 页,但没有可用的干净页时,InnoDB会先刷新一些 脏页 并等待该操作完成。此计数器统计这些等待的次数。如果innodb_buffer_pool_size设置得当,此值应该很小。Normally, writes to theInnoDBbuffer pool happen in the background. WhenInnoDBneeds to read or create a page and no clean pages are available,InnoDBflushes some dirty pages first and waits for that operation to finish. This counter counts instances of these waits. Ifinnodb_buffer_pool_sizehas been set properly, this value should be small.Innodb_buffer_pool_write_requestsInnodb_buffer_pool_write_requests对
InnoDB缓冲池 进行的写入次数。The number of writes done to theInnoDBbuffer pool.Innodb_data_fsyncsInnodb_data_fsyncs迄今为止的
fsync()操作次数。fsync()调用的频率受innodb_flush_method配置选项的设置影响。The number offsync()operations so far. The frequency offsync()calls is influenced by the setting of theinnodb_flush_methodconfiguration option.如果启用了
innodb_use_fdatasync,则统计fdatasync()操作的次数。Counts the number offdatasync()operations ifinnodb_use_fdatasyncis enabled.当前待处理的
fsync()操作数。fsync()调用的频率受innodb_flush_method配置选项设置的影响。The current number of pendingfsync()operations. The frequency offsync()calls is influenced by the setting of theinnodb_flush_methodconfiguration option.当前待处理的读取数量。The current number of pending reads.
当前待处理写入的数量。The current number of pending writes.
自服务器启动以来读取的数据量(以字节为单位)。The amount of data read since the server was started (in bytes).
数据读取的总次数(操作系统文件读取)。The total number of data reads (OS file reads).
数据写入的总次数。The total number of data writes.
到目前为止写入的数据量,单位为字节。The amount of data written so far, in bytes.
写入到双写缓冲区的页的数量。参见第 17.11.1 节,“InnoDB 磁盘 I/O”。The number of pages that have been written to the doublewrite buffer. See Section 17.11.1, “InnoDB Disk I/O”.
已执行的双写操作次数。参见第 17.11.1 节,“InnoDB 磁盘 I/O”。The number of doublewrite operations that have been performed. See Section 17.11.1, “InnoDB Disk I/O”.
指示服务器是否使用原子指令构建。Indicates whether the server was built with atomic instructions.
日志缓冲区log buffer太小,需要等待wait才能在继续之前将其flush的次数。The number of times that the log buffer was too small and a wait was required for it to be flushed before continuing.
对
InnoDB重做日志 的写请求数量。The number of write requests for theInnoDBredo log.对
InnoDB重做日志 文件的物理写入次数。The number of physical writes to theInnoDBredo log file.InnoDB当前打开的文件数量。The number of filesInnoDBcurrently holds open.对
InnoDB重做日志 文件执行的fsync()写入次数。The number offsync()writes done to theInnoDBredo log files.InnoDB重做日志 文件待执行的fsync()操作数量。The number of pendingfsync()operations for theInnoDBredo log files.等待写入
InnoDB重做日志文件的数量。The number of pending writes to theInnoDBredo log files.写入
InnoDB重做日志文件的字节数。The number of bytes written to theInnoDBredo log files.InnoDB页面大小(默认 16KB)。许多值以页面为单位计算;页面大小使它们能够轻松转换为字节。InnoDBpage size (default 16KB). Many values are counted in pages; the page size enables them to be easily converted to bytes.操作
InnoDB表创建的页面数。The number of pages created by operations onInnoDBtables.操作
InnoDB表时从InnoDB缓冲池读取的页面数。The number of pages read from theInnoDBbuffer pool by operations onInnoDBtables.通过对
InnoDB表的操作写入的页数。The number of pages written by operations onInnoDBtables.重做日志是启用还是禁用。请参见 禁用重做日志。Whether redo logging is enabled or disabled. See Disabling Redo Logging.
Innodb_redo_log_capacity_resized上一次完成的容量调整操作后,所有重做日志文件的总重做日志容量(以字节为单位)。该值包括普通和备用重做日志文件。The total redo log capacity for all redo log files, in bytes, after the last completed capacity resize operation. The value includes ordinary and spare redo log files.
如果没有待处理的缩小操作,
Innodb_redo_log_capacity_resized应该等于所使用的innodb_redo_log_capacity设置,或者如果使用了其他参数,则等于 ((innodb_log_files_in_group * innodb_log_file_size))。有关进一步说明,请参阅innodb_redo_log_capacity文档。扩展操作是即时完成的。If there is no pending resize down operation,Innodb_redo_log_capacity_resizedshould be equal to theinnodb_redo_log_capacitysetting if it's used, or it's ((innodb_log_files_in_group * innodb_log_file_size)) if those are used instead. See theinnodb_redo_log_capacitydocumentation for further clarification. Resize up operations are instantaneous.有关相关信息,请参阅 第 17.6.5 节,“重做日志”。For related information, see Section 17.6.5, “Redo Log”.
Innodb_redo_log_checkpoint_lsn重做日志检查点 LSN。有关相关信息,请参见 第 17.6.5 节,“重做日志”。The redo log checkpoint LSN. For related information, see Section 17.6.5, “Redo Log”.
当前的 LSN 表示重做日志缓冲区中最后写入的位置。
InnoDB在 MySQL 进程内部将数据写入重做日志缓冲区,然后才请求操作系统将数据写入当前的重做日志文件。有关相关信息,请参见 第 17.6.5 节,“重做日志”。The current LSN represents the last written position in the redo log buffer.InnoDBwrites data to the redo log buffer inside the MySQL process before requesting that the operating system write the data to the current redo log file. For related information, see Section 17.6.5, “Redo Log”.Innodb_redo_log_flushed_to_disk_lsn已刷新到磁盘的 LSN。
InnoDB首先将数据写入重做日志,然后请求操作系统将数据刷新到磁盘。已刷新到磁盘的 LSN 表示InnoDB知道已被刷新到磁盘的重做日志中的最后位置。有关相关信息,请参见 第 17.6.5 节,“重做日志”。The flushed-to-disk LSN.InnoDBfirst writes data to the redo log and then requests that the operating system flush the data to disk. The flushed-to-disk LSN represents the last position in the redo log thatInnoDBknows has been flushed to disk. For related information, see Section 17.6.5, “Redo Log”.一个以字节为单位的数据大小值,表示包含正在使用的重做日志数据的 LSN 范围,从重做日志使用者所需的最旧块到最新写入的块。有关相关信息,请参见 第 17.6.5 节,“重做日志”。A data size value, in bytes, representing the LSN range containing in-use redo log data, spanning from the oldest block required by redo log consumers to the latest written block. For related information, see Section 17.6.5, “Redo Log”.
当前所有磁盘上的重做日志文件占用的磁盘空间字节数,不包括备用重做日志文件。有关相关信息,请参见第 17.6.5 节,“重做日志”。The amount of disk space in bytes currently consumed by all redo log files on disk, excluding spare redo log files. For related information, see Section 17.6.5, “Redo Log”.
重做日志是否为只读。Whether the redo log is read-only.
重做日志大小调整状态,指示重做日志容量调整机制的当前状态。可能的值包括:The redo log resize status indicating the current state of the redo log capacity resize mechanism. Possible values include:
OK:没有问题,也没有待处理的重做日志容量调整操作。OK: There are no issues and no pending redo log capacity resize operations.Resizing down:缩小操作正在进行中。Resizing down: A resize down operation is in progress.
放大操作是瞬时的,因此没有待处理状态。A resize up operation is instantaneous and therefore has no pending status.
重做日志 UUID。The redo log UUID.
当前因对
InnoDB表的操作而等待的 行锁 数量。The number of row locks currently waited for by operations onInnoDBtables.获取
InnoDB表的 行锁 所花费的总时间,以毫秒为单位。The total time spent in acquiring row locks forInnoDBtables, in milliseconds.获取 行锁 对于
InnoDB表的平均时间,单位为毫秒。The average time to acquire a row lock forInnoDBtables, in milliseconds.获取 行锁 对于
InnoDB表的最长时间,单位为毫秒。The maximum time to acquire a row lock forInnoDBtables, in milliseconds.Innodb_row_lock_waitsInnodb_row_lock_waits在
InnoDB表上操作时需要等待 行锁 的次数。The number of times operations onInnoDBtables had to wait for a row lock.Innodb_rows_deletedInnodb_rows_deleted从
InnoDB表中删除的行数。The number of rows deleted fromInnoDBtables.Innodb_rows_insertedInnodb_rows_inserted插入到
InnoDB表中的行数。The number of rows inserted intoInnoDBtables.Innodb_rows_readInnodb_rows_read从
InnoDB表中读取的行数。The number of rows read fromInnoDBtables.Innodb_rows_updatedInnodb_rows_updated估计在
InnoDB表中更新的行数。The estimated number of rows updated inInnoDBtables.Note此值不保证百分之百准确。要获得更准确(但成本更高)的结果,请使用
ROW_COUNT()。This value is not meant to be 100% accurate. For an accurate (but more expensive) result, useROW_COUNT().从属于系统创建模式的
InnoDB表中删除的行数。The number of rows deleted fromInnoDBtables belonging to system-created schemas.插入到属于系统创建模式的
InnoDB表中的行数。The number of rows inserted intoInnoDBtables belonging to system-created schemas.更新属于系统创建模式的
InnoDB表中的行数。The number of rows updated inInnoDBtables belonging to system-created schemas.从属于系统创建模式的
InnoDB表中读取的行数。The number of rows read fromInnoDBtables belonging to system-created schemas.Innodb_truncated_status_writes执行
SHOW ENGINE INNODB STATUS语句时输出被截断的次数。The number of times output from theSHOW ENGINE INNODB STATUSstatement has been truncated.Innodb_undo_tablespaces_active活动撤销表空间的数量。包括隐式(
InnoDB创建的)和显式(用户创建的)撤销表空间。有关撤销表空间的详细信息,请参见 第 17.6.3.4 节,“撤销表空间”。The number of active undo tablespaces. Includes both implicit (InnoDB-created) and explicit (user-created) undo tablespaces. For information about undo tablespaces, see Section 17.6.3.4, “Undo Tablespaces”.Innodb_undo_tablespaces_explicit用户创建的撤销表空间数量。有关撤销表空间的详细信息,请参见 第 17.6.3.4 节,“撤销表空间”。The number of user-created undo tablespaces. For information about undo tablespaces, see Section 17.6.3.4, “Undo Tablespaces”.
Innodb_undo_tablespaces_implicitInnoDB创建的撤销表空间数量。MySQL 实例初始化时,InnoDB会创建两个默认的撤销表空间。有关撤销表空间的信息,请参见 第 17.6.3.4 节,“撤销表空间”。The number of undo tablespaces created byInnoDB. Two default undo tablespaces are created byInnoDBwhen the MySQL instance is initialized. For information about undo tablespaces, see Section 17.6.3.4, “Undo Tablespaces”.Innodb_undo_tablespaces_totalInnodb_undo_tablespaces_total撤销表空间的总数,包括隐式(
InnoDB创建的)和显式(用户创建的)撤销表空间,包含活跃和非活跃的表空间。有关撤销表空间的信息,请参见 第 17.6.3.4 节,“撤销表空间”。The total number of undo tablespaces. Includes both implicit (InnoDB-created) and explicit (user-created) undo tablespaces, active and inactive. For information about undo tablespaces, see Section 17.6.3.4, “Undo Tablespaces”.Key_blocks_not_flushedKey_blocks_not_flushedMyISAM键缓存中已更改但尚未刷新到磁盘的键块数。The number of key blocks in theMyISAMkey cache that have changed but have not yet been flushed to disk.Key_blocks_unusedKey_blocks_unusedMyISAM键缓存中未使用的块数。您可以使用此值来确定键缓存的使用量;请参阅key_buffer_size在 第 7.1.8 节,“服务器系统变量” 的讨论。The number of unused blocks in theMyISAMkey cache. You can use this value to determine how much of the key cache is in use; see the discussion ofkey_buffer_sizein Section 7.1.8, “Server System Variables”.Key_blocks_usedKey_blocks_usedMyISAM键缓存中已使用的块数。此值是一个高水位标记,表示曾经同时使用的最大块数。The number of used blocks in theMyISAMkey 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_requestsKey_read_requests从
MyISAM键缓存中读取键块的请求次数。The number of requests to read a key block from theMyISAMkey cache.从磁盘将关键块物理读取到
MyISAM关键缓存中的次数。如果Key_reads数值很大,那么你的key_buffer_size值可能太小。缓存未命中率可以计算为Key_reads/Key_read_requests。The number of physical reads of a key block from disk into theMyISAMkey cache. IfKey_readsis large, then yourkey_buffer_sizevalue is probably too small. The cache miss rate can be calculated asKey_reads/Key_read_requests.Key_write_requestsKey_write_requests请求将关键块写入
MyISAM关键缓存的次数。The number of requests to write a key block to theMyISAMkey cache.从
MyISAM键缓存写入磁盘的键块物理写入次数。The number of physical writes of a key block from theMyISAMkey cache to disk.Last_query_costLast_query_cost查询优化器计算的最后一个已编译查询的总成本。这对于比较同一查询的不同查询计划的成本非常有用。默认值 0 表示尚未编译任何查询。默认值为 0。
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_costhas session scope.此变量显示具有多个查询块的查询的成本,将每个查询块的成本估算相加,估算不可缓存子查询的执行次数,并将这些查询块的成本乘以子查询的执行次数。This variable shows the cost of queries that have multiple query blocks, summing the cost estimates of each query block, estimating how many times non-cacheable subqueries are executed, and multiplying the cost of those query blocks by the number of subquery executions.
Last_query_partial_plansLast_query_partial_plans查询优化器在为上一个查询构建执行计划时所进行的迭代次数。The number of iterations the query optimizer made in execution plan construction for the previous query.
Last_query_partial_plans具有会话范围。Last_query_partial_planshas session scope.Locked_connectsLocked_connects第 8.2.20 节,“帐户锁定”已弃用的同义词.The number of attempts to connect to locked user accounts. For information about account locking and unlocking, see Section 8.2.20, “Account Locking”.
Max_execution_time_exceededMax_execution_time_exceeded执行超时被超过的
SELECT语句的数量。The number ofSELECTstatements for which the execution timeout was exceeded.Max_execution_time_setMax_execution_time_set设置了非零执行超时的
SELECT语句的数量。这包括包含非零MAX_EXECUTION_TIME优化器提示的语句,以及未包含此类提示但在max_execution_time系统变量指示的超时为非零的情况下执行的语句。The number ofSELECTstatements for which a nonzero execution timeout was set. This includes statements that include a nonzeroMAX_EXECUTION_TIMEoptimizer hint, and statements that include no such hint but execute while the timeout indicated by themax_execution_timesystem variable is nonzero.Max_execution_time_set_failedMax_execution_time_set_failed尝试设置执行超时失败的
SELECT语句的数量。The number ofSELECTstatements for which the attempt to set an execution timeout failed.Max_used_connectionsMax_used_connections自服务器启动以来同时使用的最大连接数。The maximum number of connections that have been in use simultaneously since the server started.
Max_used_connections_timeMax_used_connections_timeMax_used_connections达到其当前值的时间。The time at whichMax_used_connectionsreached its current value.Not_flushed_delayed_rowsNot_flushed_delayed_rows此状态变量已被弃用(因为不支持
DELAYED插入);预计将在未来版本中移除。This status variable is deprecated (becauseDELAYEDinserts are not supported); expect it to be removed in a future release.MeCab 全文解析器插件当前使用的字符集。有关相关信息,请参阅第 14.9.9 节,“MeCab 全文解析器插件”。The character set currently used by the MeCab full-text parser plugin. For related information, see Section 14.9.9, “MeCab Full-Text Parser Plugin”.
Ongoing_anonymous_transaction_countOngoing_anonymous_transaction_count显示已标记为匿名的正在进行的事务数量。这可用于确保没有其他事务正在等待处理。Shows the number of ongoing transactions which have been marked as anonymous. This can be used to ensure that no further transactions are waiting to be processed.
Ongoing_anonymous_gtid_violating_transaction_countOngoing_anonymous_gtid_violating_transaction_count该状态变量仅在调试版本中可用。显示使用
gtid_next=ANONYMOUS且违反 GTID 一致性的正在进行的事务数量。This status variable is only available in debug builds. Shows the number of ongoing transactions which usegtid_next=ANONYMOUSand that violate GTID consistency.Ongoing_automatic_gtid_violating_transaction_countOngoing_automatic_gtid_violating_transaction_count此状态变量仅在调试版本中可用。显示使用
gtid_next=AUTOMATIC并且违反 GTID 一致性的正在进行的事务数量。This status variable is only available in debug builds. Shows the number of ongoing transactions which usegtid_next=AUTOMATICand that violate GTID consistency.打开的文件数量。此计数包括服务器打开的常规文件。不包括其他类型的文件,例如套接字或管道。此外,该计数不包括存储引擎使用其自身内部函数而不是通过服务器级别打开的文件。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.
正在打开的流的数量(主要用于日志记录)。The number of streams that are open (used mainly for logging).
Open_table_definitionsOpen_table_definitions缓存表定义的数量。The number of cached table definitions.
开放的桌子数量。The number of tables that are open.
使用
my_open()(一个mysys库函数)打开的文件数量。服务器中那些在不使用此函数的情况下打开文件的部分不会增加计数。The number of files that have been opened withmy_open()(amysyslibrary function). Parts of the server that open files without using this function do not increment the count.Opened_table_definitionsOpened_table_definitions已缓存的表定义数量。The number of table definitions that have been cached.
已打开的表的数量。如果
Opened_tables很大,那么你的table_open_cache值可能太小。The number of tables that have been opened. IfOpened_tablesis big, yourtable_open_cachevalue is probably too small.Performance_schema_xxxPerformance_schema_xxx性能模式状态变量列在 第 29.16 节,“性能模式状态变量” 中。这些变量提供有关由于内存限制而无法加载或创建的仪器的信息。Performance Schema status variables are listed in Section 29.16, “Performance Schema Status Variables”. These variables provide information about instrumentation that could not be loaded or created due to memory constraints.
Prepared_stmt_countPrepared_stmt_count当前准备好的语句数量。(语句的最大数量由
max_prepared_stmt_count系统变量给出。)The current number of prepared statements. (The maximum number of statements is given by themax_prepared_stmt_countsystem variable.)服务器执行的语句数量。该变量包括在存储程序中执行的语句,这与
Questions变量不同。它不计算COM_PING或COM_STATISTICS命令。The number of statements executed by the server. This variable includes statements executed within stored programs, unlike theQuestionsvariable. It does not countCOM_PINGorCOM_STATISTICScommands.本节开头的讨论说明了如何将这个语句计数状态变量与其他此类变量关联起来。The discussion at the beginning of this section indicates how to relate this statement-counting status variable to other such variables.
服务器执行的语句数量。这只包括客户端发送到服务器的语句,而不包括存储程序内执行的语句,这与
Queries变量不同。该变量不计算COM_PING、COM_STATISTICS、COM_STMT_PREPARE、COM_STMT_CLOSE或COM_STMT_RESET命令。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 theQueriesvariable. This variable does not countCOM_PING,COM_STATISTICS,COM_STMT_PREPARE,COM_STMT_CLOSE, orCOM_STMT_RESETcommands.本节开头的讨论说明了如何将这个语句计数状态变量与其他此类变量关联起来。The discussion at the beginning of this section indicates how to relate this statement-counting status variable to other such variables.
Replica_open_temp_tablesReplica_open_temp_tablesReplica_open_temp_tables显示复制 SQL 线程当前打开的临时表的数量。如果该值大于零,则关闭副本是不安全的;请参见 第 19.5.1.31 节,“复制和临时表”。此变量报告 所有 复制通道打开的临时表总数。Replica_open_temp_tablesshows the number of temporary tables that the replication SQL thread currently has open. If the value is greater than zero, it is not safe to shut down the replica; see Section 19.5.1.31, “Replication and Temporary Tables”. This variable reports the total count of open temporary tables for all replication channels.Resource_group_supportedResource_group_supported指示是否支持资源组功能。Indicates whether the resource group feature is supported.
在某些平台或 MySQL 服务器配置中,资源组不可用或存在限制。特别是,对于某些安装方法,Linux 系统可能需要手动操作。详情请参阅 资源组限制。On some platforms or MySQL server configurations, resource groups are unavailable or have limitations. In particular, Linux systems might require a manual step for some installation methods. For details, see Resource Group Restrictions.
Rpl_semi_sync_master_clientsRpl_semi_sync_master_clients半同步副本的数量。The number of semisynchronous replicas.
已弃用的
Rpl_semi_sync_source_clients同义词。Deprecated synonym forRpl_semi_sync_source_clients.Rpl_semi_sync_master_net_avg_wait_timeRpl_semi_sync_master_net_avg_wait_time已弃用的
Rpl_semi_sync_source_net_avg_wait_time同义词。Deprecated synonym forRpl_semi_sync_source_net_avg_wait_time.Rpl_semi_sync_master_net_wait_timeRpl_semi_sync_master_net_wait_time已弃用的
Rpl_semi_sync_source_net_wait_time同义词。Deprecated synonym forRpl_semi_sync_source_net_wait_time.Rpl_semi_sync_master_net_waits源等待副本回复的总次数。The total number of times the source waited for replica replies.
拒绝查询,其选择列表、
Rpl_semi_sync_source_net_waits.Deprecated synonym forRpl_semi_sync_source_net_waits.拒绝查询,其选择列表、
Rpl_semi_sync_source_no_times.Deprecated synonym forRpl_semi_sync_source_no_times.拒绝查询,其选择列表、
Rpl_semi_sync_source_no_tx.Deprecated synonym forRpl_semi_sync_source_no_tx.已弃用的
Rpl_semi_sync_source_status的同义词。Deprecated synonym forRpl_semi_sync_source_status.Rpl_semi_sync_master_timefunc_failures已弃用的
Rpl_semi_sync_source_timefunc_failures的同义词。Deprecated synonym forRpl_semi_sync_source_timefunc_failures.Rpl_semi_sync_master_tx_avg_wait_time已弃用的同义词,指向
Rpl_semi_sync_source_tx_avg_wait_time。Deprecated synonym forRpl_semi_sync_source_tx_avg_wait_time.Rpl_semi_sync_master_tx_wait_time已弃用的同义词,指向
Rpl_semi_sync_source_tx_wait_time。Deprecated synonym forRpl_semi_sync_source_tx_wait_time.已弃用的同义词,指
Rpl_semi_sync_source_tx_waits。Deprecated synonym forRpl_semi_sync_source_tx_waits.Rpl_semi_sync_master_wait_pos_backtraverse已弃用的同义词,指
Rpl_semi_sync_source_wait_pos_backtraverse。Deprecated synonym forRpl_semi_sync_source_wait_pos_backtraverse.Rpl_semi_sync_master_wait_sessions已弃用的
Rpl_semi_sync_source_wait_sessions的同义词。Deprecated synonym forRpl_semi_sync_source_wait_sessions.已弃用的
Rpl_semi_sync_source_yes_tx的同义词。Deprecated synonym forRpl_semi_sync_source_yes_tx.半同步副本的数量。The number of semisynchronous replicas.
当源上安装了
rpl_semi_sync_source插件(semisync_source.so库)时可用。Available when therpl_semi_sync_sourceplugin (semisync_source.solibrary) is installed on the source.Rpl_semi_sync_source_net_avg_wait_time源等待副本回复的平均时间,单位为微秒。此变量始终为
0,并且已弃用;预计将在将来的版本中移除。The average time in microseconds the source waited for a replica reply. This variable is always0, and is deprecated; expect it to be removed in a future version.当源上安装了
rpl_semi_sync_source插件(semisync_source.so库)时可用。Available when therpl_semi_sync_sourceplugin (semisync_source.solibrary) is installed on the source.Rpl_semi_sync_source_net_wait_time源等待副本回复的总时间(微秒)。该变量始终为
0,已弃用;预计将在未来版本中删除。The total time in microseconds the source waited for replica replies. This variable is always0, and is deprecated; expect it to be removed in a future version.当源上安装了
rpl_semi_sync_source插件(semisync_source.so库)时可用。Available when therpl_semi_sync_sourceplugin (semisync_source.solibrary) is installed on the source.Rpl_semi_sync_source_net_waits源等待副本回复的总次数。The total number of times the source waited for replica replies.
当源上安装了
rpl_semi_sync_source插件(semisync_source.so库)时可用。Available when therpl_semi_sync_sourceplugin (semisync_source.solibrary) is installed on the source.源关闭半同步复制的次数。The number of times the source turned off semisynchronous replication.
当源上安装了
rpl_semi_sync_source插件(semisync_source.so库)时可用。Available when therpl_semi_sync_sourceplugin (semisync_source.solibrary) is installed on the source.未被副本成功确认的提交次数。The number of commits that were not acknowledged successfully by a replica.
当源上安装了
rpl_semi_sync_source插件(semisync_source.so库)时可用。Available when therpl_semi_sync_sourceplugin (semisync_source.solibrary) is installed on the source.源上半同步复制当前是否正在运行。如果插件已启用且已发生提交确认,则值为
ON。如果插件未启用或由于提交确认超时而源回退到异步复制,则值为OFF。Whether semisynchronous replication currently is operational on the source. The value isONif the plugin has been enabled and a commit acknowledgment has occurred. It isOFFif the plugin is not enabled or the source has fallen back to asynchronous replication due to commit acknowledgment timeout.当源上安装了
rpl_semi_sync_source插件(semisync_source.so库)时可用。Available when therpl_semi_sync_sourceplugin (semisync_source.solibrary) is installed on the source.Rpl_semi_sync_source_timefunc_failures源在调用诸如
gettimeofday()等时间函数失败的次数。The number of times the source failed when calling time functions such asgettimeofday().当源上安装了
rpl_semi_sync_source插件(semisync_source.so库)时可用。Available when therpl_semi_sync_sourceplugin (semisync_source.solibrary) is installed on the source.Rpl_semi_sync_source_tx_avg_wait_time源等待每笔事务的平均时间(微秒)。The average time in microseconds the source waited for each transaction.
当源上安装了
rpl_semi_sync_source插件(semisync_source.so库)时可用。Available when therpl_semi_sync_sourceplugin (semisync_source.solibrary) is installed on the source.Rpl_semi_sync_source_tx_wait_timeRpl_semi_sync_source_tx_wait_time源等待事务的总时间(微秒)。The total time in microseconds the source waited for transactions.
当源上安装了
rpl_semi_sync_source插件(semisync_source.so库)时可用。Available when therpl_semi_sync_sourceplugin (semisync_source.solibrary) is installed on the source.Rpl_semi_sync_source_tx_waitsRpl_semi_sync_source_tx_waits源等待事务的总次数。The total number of times the source waited for transactions.
当源上安装了
rpl_semi_sync_source插件(semisync_source.so库)时可用。Available when therpl_semi_sync_sourceplugin (semisync_source.solibrary) is installed on the source.Rpl_semi_sync_source_wait_pos_backtraverseRpl_semi_sync_source_wait_pos_backtraverse源等待具有比之前等待的事件更低二进制坐标的事件的总次数。当事务开始等待回复的顺序与它们的二进制日志事件被写入的顺序不同时,可能会发生这种情况。The total number of times the source 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.
当源上安装了
rpl_semi_sync_source插件(semisync_source.so库)时可用。Available when therpl_semi_sync_sourceplugin (semisync_source.solibrary) is installed on the source.Rpl_semi_sync_source_wait_sessionsRpl_semi_sync_source_wait_sessions当前正在等待副本回复的会话数。The number of sessions currently waiting for replica replies.
当源上安装了
rpl_semi_sync_source插件(semisync_source.so库)时可用。Available when therpl_semi_sync_sourceplugin (semisync_source.solibrary) is installed on the source.被副本成功确认的提交次数。The number of commits that were acknowledged successfully by a replica.
当源上安装了
rpl_semi_sync_source插件(semisync_source.so库)时可用。Available when therpl_semi_sync_sourceplugin (semisync_source.solibrary) is installed on the source.显示半同步复制在副本上当前是否正在运行。如果插件已启用且复制 I/O(接收器)线程正在运行,则为
ON,否则为OFF。Shows whether semisynchronous replication is currently operational on the replica. This isONif the plugin has been enabled and the replication I/O (receiver) thread is running,OFFotherwise.当源上安装了
rpl_semi_sync_source插件(semisync_source.so库)时可用。Available when therpl_semi_sync_sourceplugin (semisync_source.solibrary) is installed on the source.已弃用的
Rpl_semi_sync_replica_status同义词。Deprecated synonym forRpl_semi_sync_replica_status.该变量的值是由
sha256_password(已弃用)身份验证插件用于基于 RSA 密钥对的密码交换的公钥。仅当服务器成功初始化由系统变量sha256_password_private_key_path和sha256_password_public_key_path指定的文件中的私钥和公钥时,该值才非空。Rsa_public_key的值来自后者文件。The value of this variable is the public key used by thesha256_password(deprecated) authentication plugin for RSA key pair-based password exchange. The value is nonempty only if the server successfully initializes the private and public keys in the files named by thesha256_password_private_key_pathandsha256_password_public_key_pathsystem variables. The value ofRsa_public_keycomes from the latter file.有关
sha256_password的信息,请参见 第 8.4.1.3 节,“SHA-256 可插拔身份验证”。For information aboutsha256_password, see Section 8.4.1.3, “SHA-256 Pluggable Authentication”.Secondary_engine_execution_count仅适用于 MySQL HeatWave。更多信息请参见 状态变量。For use with MySQL HeatWave only. See Status Variables, for more information.
由于未使用索引而执行表扫描的连接数量。如果此值不为 0,您应仔细检查表的索引。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.
在引用表上使用范围搜索的连接次数。The number of joins that used a range search on a reference table.
在第一个表上使用范围的连接次数。即使该值相当大,这通常也不是一个关键问题。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.
在每行之后检查键使用的无键连接数。如果此值不为 0,您应仔细检查表的索引。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.
对第一个表执行全表扫描的连接数。The number of joins that did a full scan of the first table.
Slave_open_temp_tablesSlave_open_temp_tables已弃用的别名,指代
Replica_open_temp_tables。Deprecated alias forReplica_open_temp_tables.Slave_rows_last_search_algorithm_usedSlave_rows_last_search_algorithm_used已弃用的别名,指代
Replica_rows_last_search_algorithm_used。Deprecated alias forReplica_rows_last_search_algorithm_used.Slow_launch_threadsSlow_launch_threads创建时间超过
slow_launch_time秒的线程数量。The number of threads that have taken more thanslow_launch_timeseconds to create.执行时间超过
long_query_time秒的查询数量。无论是否启用慢查询日志,该计数器都会增加。有关该日志的信息,请参见 第 7.4.5 节,“慢查询日志”。The number of queries that have taken more thanlong_query_timeseconds. This counter increments regardless of whether the slow query log is enabled. For information about that log, see Section 7.4.5, “The Slow Query Log”.Sort_merge_passesSort_merge_passes排序算法必须进行的合并次数。如果这个值很大,你应该考虑增加系统变量
sort_buffer_size的值。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 thesort_buffer_sizesystem variable.使用范围完成的排序数量。The number of sorts that were done using ranges.
已排序行的数量。The number of sorted rows.
通过扫描表格完成的排序次数。The number of sorts that were done by scanning the table.
Ssl_accept_renegotiatesSsl_accept_renegotiates建立连接所需的协商次数。The number of negotiates needed to establish the connection.
接受的 SSL 连接数。The number of accepted SSL connections.
Ssl_callback_cache_hitsSsl_callback_cache_hits回调缓存命中的次数。The number of callback cache hits.
当前的加密密码(未加密连接时为空)。The current encryption cipher (empty for unencrypted connections).
可能的 SSL 密码列表(非 SSL 连接为空)。如果 MySQL 支持 TLSv1.3,则该值包括可能的 TLSv1.3 密码套件。请参见 第 8.3.2 节,“加密连接 TLS 协议和密码”。The list of possible SSL ciphers (empty for non-SSL connections). If MySQL supports TLSv1.3, the value includes the possible TLSv1.3 ciphersuites. See Section 8.3.2, “Encrypted Connection TLS Protocols and Ciphers”.
尝试与启用 SSL 的复制源服务器建立 SSL 连接的次数。The number of SSL connection attempts to an SSL-enabled replication source server.
建立与启用 SSL 的复制源服务器连接所需的协商次数。The number of negotiates needed to establish the connection to an SSL-enabled replication source server.
SSL 上下文验证深度(链中有多少证书会被测试)。The SSL context verification depth (how many certificates in the chain are tested).
SSL 上下文验证模式。The SSL context verification mode.
默认的 SSL 超时。The default SSL timeout.
与服务器成功的 SSL 连接数。The number of successful SSL connections to the server.
成功连接到启用 SSL 的复制源服务器的副本连接数。The number of successful replica connections to an SSL-enabled replication source server.
SSL 证书有效的最后日期。要检查 SSL 证书的到期信息,请使用以下语句:The last date for which the SSL certificate is valid. To check SSL certificate expiration information, use this statement:
mysql>
SHOW STATUS LIKE 'Ssl_server_not%';+-----------------------+--------------------------+ | Variable_name | Value | +-----------------------+--------------------------+ | Ssl_server_not_after | Apr 28 14:16:39 2025 GMT | | Ssl_server_not_before | May 1 14:16:39 2015 GMT | +-----------------------+--------------------------+SSL 证书开始生效的日期。The first date for which the SSL certificate is valid.
SSL 会话缓存命中的次数。The number of SSL session cache hits.
SSL 会话缓存未命中的次数。The number of SSL session cache misses.
SSL 会话缓存模式。当
ssl_session_cache_mode服务器变量的值为ON时,Ssl_session_cache_mode状态变量的值为SERVER。The SSL session cache mode. When the value of thessl_session_cache_modeserver variable isON, the value of theSsl_session_cache_modestatus variable isSERVER.SSL 会话缓存溢出的次数。The number of SSL session cache overflows.
SSL 会话缓存大小。The SSL session cache size.
缓存中 SSL 会话的超时时间(秒)。The timeout value in seconds of SSL sessions in the cache.
SSL 会话缓存超时的次数。The number of SSL session cache timeouts.
如果当前 MySQL 会话未使用 TLS,或 TLS 会话未被重用,则此值等于 0;否则等于 1。This is equal to 0 if TLS was not used in the current MySQL session, or if a TLS session has not been reused; otherwise it is equal to 1.
Ssl_sessions_reused具有会话范围。Ssl_sessions_reusedhas session scope.Ssl_used_session_cache_entries使用了多少 SSL 会话缓存条目。How many SSL session cache entries were used.
用于复制 SSL 连接的验证深度。The verification depth for replication SSL connections.
服务器在使用 SSL 的连接中使用的验证模式。该值是一个位掩码;位在
openssl/ssl.h头文件中定义:The verification mode used by the server for a connection that uses SSL. The value is a bitmask; bits are defined in theopenssl/ssl.hheader file:# define SSL_VERIFY_NONE 0x00 # define SSL_VERIFY_PEER 0x01 # define SSL_VERIFY_FAIL_IF_NO_PEER_CERT 0x02 # define SSL_VERIFY_CLIENT_ONCE 0x04
SSL_VERIFY_PEER表示服务器请求客户端证书。如果客户端提供证书,服务器将执行验证,并且仅在验证成功时继续。SSL_VERIFY_CLIENT_ONCE表示客户端证书请求仅在初始握手中执行一次。SSL_VERIFY_PEERindicates that the server asks for a client certificate. If the client supplies one, the server performs verification and proceeds only if verification is successful.SSL_VERIFY_CLIENT_ONCEindicates that a request for the client certificate is performed only in the initial handshake.连接的 SSL 协议版本(例如,TLSv1.2)。如果连接未加密,则该值为空。The SSL protocol version of the connection (for example, TLSv1.2). If the connection is not encrypted, the value is empty.
Table_locks_immediateTable_locks_immediate请求表锁能立即被授予的次数。The number of times that a request for a table lock could be granted immediately.
Table_locks_waitedTable_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_hitsTable_open_cache_hits打开表缓存查找的命中次数。The number of hits for open tables cache lookups.
Table_open_cache_missesTable_open_cache_misses打开表缓存查找未命中的次数。The number of misses for open tables cache lookups.
打开表缓存的溢出次数。这是在表被打开或关闭之后,缓存实例有未使用的条目且实例的大小大于
table_open_cache/table_open_cache_instances的次数。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 thantable_open_cache/table_open_cache_instances.对于由 mysqld 用作内部 XA 事务恢复的事务协调器时使用的基于内存映射的日志实现,该变量指示自服务器启动以来日志使用的最大页数。如果
Tc_log_max_pages_used与Tc_log_page_size的乘积总是明显小于日志大小,则日志大小大于必要值,可以减小。(该大小由--log-tc-size选项设置。该变量未使用:二进制日志恢复不需要它,并且除非支持两阶段提交且支持 XA 事务的存储引擎数量大于 1,否则不会使用基于内存映射的恢复日志方法。(InnoDB是唯一适用的引擎。)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 ofTc_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. 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 that are capable of two-phase commit and that support XA transactions is greater than one. (InnoDBis the only applicable engine.)用于 XA 恢复日志内存映射实现的页面大小。默认值通过
getpagesize()确定。由于与Tc_log_max_pages_used描述的原因相同,该变量未使用。The page size used for the memory-mapped implementation of the XA recovery log. The default value is determined usinggetpagesize(). This variable is unused for the same reasons as described forTc_log_max_pages_used.对于恢复日志的内存映射实现,每当服务器无法提交事务并且必须等待日志中的空闲页面时,该变量会递增。如果此值很大,您可能需要增加日志大小(使用
--log-tc-size选项)。对于基于二进制日志的恢复,每当二进制日志无法关闭,因为存在正在进行的两阶段提交时,该变量会递增。(关闭操作会等待所有此类事务完成。)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-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.)是否支持服务器遥测指标。Whether server telemetry metrics is supported.
欲了解更多信息,请参阅 MySQL 源代码文档中的 服务器遥测指标服务 部分。For more information, see the Server telemetry metrics service section in the MySQL Source Code documentation.
显示当前使用遥测的会话数量。当卸载遥测组件时,这可能很有用,以监控有多少会话阻止卸载操作。Displays the current number of sessions instrumented with telemetry. This can be useful when unloading the Telemetry component, to monitor how many sessions are blocking the unload operation.
有关更多信息,请参阅 MySQL 源代码文档中的 服务器遥测跟踪服务 部分以及 第 35 章,遥测。For more information, see the Server telemetry traces service section in the MySQL Source Code documentation and Chapter 35, Telemetry.
是否支持服务器遥测跟踪。Whether server telemetry traces is supported.
欲了解更多信息,请参阅 MySQL 源代码文档中的 服务器遥测跟踪服务 部分。For more information, see the Server telemetry traces service section in the MySQL Source Code documentation.
线程缓存中的线程数量。The number of threads in the thread cache.
Threads_connectedThreads_connected当前打开的连接数。The number of currently open connections.
Threads_createdThreads_created用于处理连接而创建的线程数。如果
Threads_created很大,你可能需要增加thread_cache_size的值。缓存未命中率可以计算为Threads_created/Connections。The number of threads created to handle connections. IfThreads_createdis big, you may want to increase thethread_cache_sizevalue. The cache miss rate can be calculated asThreads_created/Connections.Threads_runningThreads_running未处于睡眠状态的线程数。The number of threads that are not sleeping.
Tls_library_versionTls_library_version用于此 MySQL 实例的 OpenSSL 库的运行时版本。The runtime version of the OpenSSL library that is in use for this MySQL instance.
Tls_sni_server_nameTls_sni_server_name用于此会话的服务器名称指示(SNI),如果由客户端指定;否则为空。SNI 是 TLS 协议的一个扩展(OpenSSL 必须使用 TLS 扩展进行编译,该状态变量才会起作用)。MySQL 对 SNI 的实现仅代表客户端。The Server Name Indication (SNI) that is in use for this session, if specified by the client; otherwise, empty. SNI is an extension to the TLS protocol (OpenSSL must be compiled using TLS extensions for this status variable to function). The MySQL implementation of SNI represents the client-side only.
服务器已运行的秒数。The number of seconds that the server has been up.
Uptime_since_flush_statusUptime_since_flush_status自最近一次
FLUSH STATUS语句以来的秒数。The number of seconds since the most recentFLUSH STATUSstatement.