Skip to main content

MySQL SQL Statistics

SQL Statistic nameDescriptionDBmarlin collects?Doc link
AVG_TIMER_WAITAverage duration of TIMER_WAIT events Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-events-statements-current-table.html
COUNT_STARThe number of summarized events. This value includes all events, whether timed or nontimed. Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-wait-summary-tables.html
DURATIONThe duration of the statement Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-timing.html
EXECUTIONSThe number of times the statement has been executed Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-timing.html
MAX_TIMER_WAITMaximum duration of TIMER_WAIT events Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-events-statements-current-table.html
MIN_TIMER_WAITMinimum duration of TIMER_WAIT events Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-events-statements-current-table.html
SUM_CREATED_TMP_DISK_TABLESSummary of the number of internal on-disk temporary tables created by the server while executing statements. Yes https://dev.mysql.com/doc/refman/8.2/en/server-status-variables.html#statvar_Created_tmp_disk_tables
SUM_CREATED_TMP_TABLESHow many temporary files mysql has created. Yes https://dev.mysql.com/doc/refman/8.2/en/server-status-variables.html#statvar_Created_tmp_files
SUM_ERRORSSummary of the number of errors that occurred for the statement. Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-events-statements-current-table.html
SUM_LOCK_TIMESummary of the time spent waiting for table locks. This value is computed in microseconds but normalized to picoseconds for easier comparison with other Performance Schema timers. Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-events-statements-current-table.html
SUM_NO_GOOD_INDEX_USED1 if the server found no good index to use for the statement, 0 otherwise. Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-events-statements-current-table.html
SUM_NO_INDEX_USED1 if the statement performed a table scan without using an index, 0 otherwise. Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-events-statements-current-table.html
SUM_ROWS_AFFECTEDSummary of the number of rows affected by the statement. Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-events-statements-current-table.html
SUM_ROWS_EXAMINEDSummary of the number of rows examined by the server layer (not counting any processing internal to storage engines). Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-events-statements-current-table.html
SUM_ROWS_SENTSummary of the number of rows returned by the statement. Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-events-statements-current-table.html
SUM_SELECT_FULL_JOINThe number of joins that perform table scans because they do not use indexes. If this value is not 0, you should carefully check the indexes of your tables. Yes https://dev.mysql.com/doc/refman/8.2/en/server-status-variables.html#statvar_Select_full_join
SUM_SELECT_FULL_RANGE_JOINThe number of joins that used a range search on a reference table. Yes https://dev.mysql.com/doc/refman/8.2/en/server-status-variables.html#statvar_Select_full_range_join
SUM_SELECT_RANGEThe number of joins that used ranges on the first table. This is normally not a critical issue even if the value is quite large. Yes https://dev.mysql.com/doc/refman/8.2/en/server-status-variables.html#statvar_Select_range
SUM_SELECT_RANGE_CHECKThe number of joins without keys that check for key usage after each row. If this is not 0, you should carefully check the indexes of your tables. Yes https://dev.mysql.com/doc/refman/8.2/en/server-status-variables.html#statvar_Select_range_check
SUM_SELECT_SCANThe number of joins that did a full scan of the first table. Yes https://dev.mysql.com/doc/refman/8.2/en/server-status-variables.html#statvar_Select_scan
SUM_SORT_MERGE_PASSESThe number of merge passes that the sort algorithm has had to do. If this value is large, you should consider increasing the value of the sort_buffer_size system variable. Yes https://dev.mysql.com/doc/refman/8.2/en/server-status-variables.html#statvar_Sort_merge_passes
SUM_SORT_RANGEThe number of sorts that were done using ranges. Yes https://dev.mysql.com/doc/refman/8.2/en/server-status-variables.html#statvar_Sort_range
SUM_SORT_ROWSThe number of sorted rows. Yes https://dev.mysql.com/doc/refman/8.2/en/server-status-variables.html#statvar_Sort_rows
SUM_SORT_SCANLike the SORT_SCAN status variable, but specific to the statement. Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-events-statements-current-table.html
SUM_TIMER_WAITSum of durations of TIMER_WAIT events Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-events-statements-current-table.html
SUM_WARNINGSSummary of the number of warnings, from the statement diagnostics area. Yes https://dev.mysql.com/doc/refman/8.2/en/performance-schema-events-statements-current-table.html

Search online​

If this article doesn't have the information you need you can try searching online. Remember, you can contribute suggestions to this page.