ents_summary_by_digest`', v_digests_table); END IF; IF (@sys.statement_performance_analyzer.limit > 0) THEN SET v_sql = CONCAT(v_sql, ' LIMIT ', @sys.statement_performance_analyzer.limit); END IF; CALL sys.execute_prepared_stmt(v_sql); END IF; END IF; IF (v_this_thread_enabled = 'YES') THEN CALL sys.ps_setup_enable_thread(CONNECTION_ID()); END IF; IF (@log_bin = 1) THEN SET sql_log_bin = @log_bin; END IF; END Description Create a report of the statements running on the server. The views are calculated based on the overall and/or delta activity. Requires the SUPER privilege for "SET sql_log_bin = 0;". Parameters in_action (ENUM('snapshot', 'overall', 'delta', 'create_tmp', 'create_table', 'save', 'cleanup')): The action to take. Supported actions are: * snapshot Store a snapshot. The default is to make a snapshot of the current content of performance_schema.events_statements_summary_by_digest, but by setting in_table this can be overwritten to copy the content of the specified table. The snapshot is stored in the sys.tmp_digests temporary table. * overall Generate analyzis based on the content specified by in_table. For the overall analyzis, in_table can be NOW() to use a fresh snapshot. This will overwrite an existing snapshot. Use NULL for in_table to use the existing snapshot. If in_table IS NULL and no snapshot exists, a new will be created. See also in_views and @sys.statement_performance_analyzer.limit. * delta Generate a delta analysis. The delta will be calculated between the reference table in in_table and the snapshot. An existing snapshot must exist. The action uses the sys.tmp_digests_delta temporary table. See also in_views and @sys.statement_performance_analyzer.limit. * create_table Create a regular table suitable for storing the snapshot for later use, e.g. for calculating deltas. * create_tmp Create a temporary table suitable for storing the snapshot for later use, e.g. for calculating deltas. * save Save the snapshot in the table specified by in_table. The table must exists and have the correct structure. If no snapshot exists, a new is created. * cleanup Remove the temporary tables used for the snapshot and delta. in_table (VARCHAR(129)): The table argument used for some actions. Use the format 'db1.t1' or 't1' without using any backticks (`) for quoting. Periods (.) are not supported in the database and table names. The meaning of the table for each action supporting the argument is: * snapshot The snapshot is created based on the specified table. Set to NULL or NOW() to use the current content of performance_schema.events_statements_summary_by_digest. * overall The table with the content to create the overall analyzis for. The following values can be used: - A table name - use the content of that table. - NOW() - create a fresh snapshot and overwrite the existing snapshot. - NULL - use the last stored snapshot. * delta The table name is mandatory and specified the reference view to compare