• statement_performance_analyzer.limit , 

@sys.statement_performance_analyzer.limit 

The maximum number of rows to return for views that have no built-in limit. (For example, the statements_with_runtimes_in_95th_percentile  view has a built-in limit in the sense that it returns only statements with average execution time in the 95th percentile.) The default is 100. 

• statement_performance_analyzer.view , @sys.statement_performance_analyzer.view 

The custom query or view to be used by the statement_performance_analyzer()  procedure (which is itself invoked by the diagnostics()  procedure). 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. The default is NULL  (no custom view defined). 

• statement_truncate_len , @sys.statement_truncate_len 

The maximum length of statements returned by the format_statement()  function. Longer statements are truncated to this length. The default is 64. 

Other options can be added to the sys_config  table. For example, the diagnostics()  and execute_prepared_stmt()  procedures use the debug  option if it exists, but this option is not part of the sys_config  table by default because debug output normally is enabled only temporarily, by setting the corresponding @sys.debug  user-defined variable. To enable debug output without having to set that variable in individual sessions, add the option to the table: 

mysql> INSERT INTO sys.sys_config (variable, value) VALUES(’debug’, ’ON’); 

To change the debug setting in the table, do two things. First, modify the value in the table itself: 

mysql> UPDATE sys.sys_config SET value = ’OFF’ WHERE variable = ’debug’; 

Second, to also ensure that procedure invocations within the current session use the changed value from the table, set the corresponding user-defined variable to NULL : 

## 28.4.2.2 The sys_config_insert_set_user Trigger 

mysql> SET @sys.debug = NULL; 

For rows added to the sys_config  table by INSERT  statements, the sys_config_insert_set_user trigger sets the set_by  column to the current user. 

## 28.4.2.3 The sys_config_update_set_user Trigger 

The sys_config_update_set_user  trigger for the sys_config  table is similar to the sys_config_insert_set_user  trigger, but for UPDATE  statements. 

## 28.4.3 sys Schema Views 

The following sections describe sys  schema views. 

The sys  schema contains many views that summarize Performance Schema tables in various ways. Most of these views come in pairs, such that one member of the pair has the same name as the other member, plus a x$  prefix. For example, the host_summary_by_file_io  view summarizes file I/O grouped by host and displays latencies converted from picoseconds to more readable values (with units); 

