All of the Com_stmt_xxx variables areincreased even if a prepared statement argument is unknown or an error occurredduring execution. In other words, their values correspond to the number ofrequests issued, not to the number of requests successfully completed.mysql
全部的Com_stmt_xxx變量都會增長,即便預編譯語句的參數未知或者在執行中發生錯誤。換句話說,他們的值與請求發起的次數,不是與請求執行成功的次數對應。sql
The Com_stmt_xxx status variables are asfollows:網絡
Com_stmt_prepareide
Com_stmt_executefetch
Com_stmt_fetchspa
Com_stmt_send_long_dataorm
Com_stmt_resetserver
Com_stmt_closeip
Those variables stand for preparedstatement commands. Their names refer to the COM_xxx command set used in thenetwork layer. In other words, their values increase whenever preparedstatement API calls such as mysql_stmt_prepare(), mysql_stmt_execute(), and soforth are executed. However, Com_stmt_prepare, Com_stmt_execute andCom_stmt_close also increase for PREPARE, EXECUTE, or DEALLOCATE PREPARE,respectively. Additionally, the values of the older statement counter variablesCom_prepare_sql, Com_execute_sql, and Com_dealloc_sql increase for the PREPARE,EXECUTE, and DEALLOCATE PREPARE statements. Com_stmt_fetch stands for the totalnumber of network round-trips issued when fetching from cursors.rem
那些變量表示預編譯語句命令。他們的名字涉及到Com_stmt_xxx命令在網絡層使用。換句話說,不管何時預編譯語句API調用mysql_stmt_prepare(), mysql_stmt_execute()執行時,他們的值都會增長。然而Com_stmt_prepare, Com_stmt_execute, Com_stmt_close 針對PREPARE,EXECUTE, or DEALLOCATE PREPARE也會增長。而且,舊的語句計數參數Com_prepare_sql, Com_execute_sql, Com_dealloc_sql針對PREPARE,EXECUTE, and DEALLOCATE PREPARE語句也會增長。Com_stmt_fetch表明提取遊標時來回總共的次數。
Com_stmt_reprepare indicates the number oftimes statements were automatically reprepared by the server after metadatachanges to tables or views referred to by the statement. A reprepare operationincrements Com_stmt_reprepare, and also Com_stmt_prepare.
Com_stmt_reprepare表示當元數據(視圖或表)被相關的語句修改後,語句被自動從新準備的次數。一次從新準備操做增長Com_stmt_reprepare和Com_stmt_prepare.
Com_explain_other indicates the number ofEXPLAIN FOR CONNECTION statements executed. See Section 8.8.4, 「ObtainingExecution Plan Information for a Named Connection」. It was introduced in MySQL5.7.2.
Com_change_repl_filter indicates the numberof CHANGE REPLICATION FILTER statements executed. It was introduced in MySQL5.7.3.