sys Schema Stored Procedures The histogram output in statement units. For example,  * = 2 units  in the histogram legend means that each  *  character represents 2 statements. Traces all Performance Schema instrumentation for a specific statement digest. If you find a statement of interest within the Performance Schema events_statements_summary_by_digest  table, specify its  DIGEST  column MD5 value to this procedure and indicate the polling duration and interval. The result is a report of all statistics tracked within Performance Schema for that digest for the interval. The procedure also attempts to execute  EXPLAIN  for the longest running example of the digest during the interval. This attempt might fail because the Performance Schema truncates long  SQL_TEXT  values. Consequently,  EXPLAIN  fails, due to parse errors. This procedure disables binary logging during its execution by manipulating the session value of the sql_log_bin  system variable. That is a restricted operation, so the procedure requires privileges sufficient to set restricted session variables. See Section 5.1.9.1, “System Variable Privileges” . 5194 • in_digest VARCHAR(32) : The statement digest identifier to analyze. • in_runtime INT : How long to run the analysis in seconds. • in_interval DECIMAL(2,2) : The analysis interval in seconds (which can be fractional) at which to try to take snapshots. • in_start_fresh BOOLEAN : Whether to truncate the Performance Schema events_statements_history_long  and  events_stages_history_long  tables before starting. Example 28.4.4.22 The ps_trace_statement_digest() Procedure Parameters mysql>  CALL sys.ps_statement_avg_latency_histogram()\G *************************** 1. row *************************** Performance Schema Statement Digest Average Latency Histogram: . = 1 unit * = 2 units # = 3 units (0 - 66ms) 88 | ############################# (66 - 133ms) 14 | .............. (133 - 199ms) 4 | .... (199 - 265ms) 5 | ** (265 - 332ms) 1 | . (332 - 398ms) 0 | (398 - 464ms) 1 | . (464 - 531ms) 0 | (531 - 597ms) 0 | (597 - 663ms) 0 | (663 - 730ms) 0 | (730 - 796ms) 0 | (796 - 863ms) 0 | (863 - 929ms) 0 | (929 - 995ms) 0 | (995 - 1062ms) 0 | Total Statements: 114; Buckets: 16; Bucket Size: 66 ms;