The MySQL Statement Digests dashboard is available for MySQL 5.6.5+ servers with the performance_schema engine enabled. Statement digests are normalized statements which have the same operation plan. Even if values in the statement differ, the server is performing the same operations and can therefore be aggregated for the purposes of analysis. The agent collects these from the server along with raw and calculated statistical data and provides them to the FMS.
The main time plot displays the top X statements by one of several metrics that can be selected using the provided dropdown. Below that are several graphs which can be correlated with statement performance to determine impact on the system.
On the bottom half of the page is a table listing all statement digests gathered from the server. The number of statement digests which the server maintains varies by version and is set with performance_schema_digests_size. If the number of digest types exceeds that, excess statements will be put into a single digest, also collected. All statistics shown in the table are period values for the selected time range with the exception of First/Last seen and Min/Max Wait Time. By default, an advanced filter is set for the table to exclude statements performed on the system databases mysql, performance_schema, and information_schema. This can be disabled by clicking the ‘x’ in the filter text box. Selecting a row of the table will update the bottom portion with graphed metrics related to the selected digest.
Page actions available in the right-hand panel include the MySQL Agent Selector and an action to Delete Old Statements. When the MySQL server is restarted or the performance_schema’s statement digests table is truncated, digest statistics will be reset. If a previously collected statement is executed on the server again, it will be merged with the historical data preserved by Foglight. If it is never executed again, it will become a dead object. The Delete Old Statements action is a convenience action to delete these dead topology objects and remove them and their history from the FMS.