sys Schema Stored Procedures If this option is  ON , produce debugging output. The default is  OFF . • statement_performance_analyzer.limit , @sys.statement_performance_analyzer.limit The maximum number of rows to return for views that have no built-in limit. The default is 100. • statement_performance_analyzer.view ,  @sys.statement_performance_analyzer.view The custom query or view to be used. If the option value contains a space, it is interpreted as a query. Otherwise, it must be the name of an existing view that queries the Performance Schema events_statements_summary_by_digest  table. There cannot be any  LIMIT  clause in the query or view definition if the  statement_performance_analyzer.limit  configuration option is greater than 0. If specifying a view, use the same format as for the  in_table  parameter. The default is  NULL (no custom view defined). Example To create a report with the queries in the 95th percentile since the last truncation of events_statements_summary_by_digest  and with a one-minute delta period: 1. Create a temporary table to store the initial snapshot. 2. Create the initial snapshot. 3. Save the initial snapshot in the temporary table. 4. Wait one minute. 5. Create a new snapshot. 6. Perform analysis based on the new snapshot. 7. Perform analysis based on the delta between the initial and new snapshots. mysql>  CALL sys.statement_performance_analyzer(’create_tmp’, ’mydb.tmp_digests_ini’, NULL); Query OK, 0 rows affected (0.08 sec) mysql>  CALL sys.statement_performance_analyzer(’snapshot’, NULL, NULL); Query OK, 0 rows affected (0.02 sec) mysql>  CALL sys.statement_performance_analyzer(’save’, ’mydb.tmp_digests_ini’, NULL); Query OK, 0 rows affected (0.00 sec) mysql>  DO SLEEP(60); Query OK, 0 rows affected (1 min 0.00 sec) mysql>  CALL sys.statement_performance_analyzer(’snapshot’, NULL, NULL); Query OK, 0 rows affected (0.02 sec) mysql>  CALL sys.statement_performance_analyzer(’overall’, NULL, ’with_runtimes_in_95th_percentile’); +-----------------------------------------+ | Next Output | +-----------------------------------------+ | Queries with Runtime in 95th Percentile | +-----------------------------------------+ 1 row in set (0.05 sec) ... mysql>  CALL 5199