All pages
Powered by GitBook
1 of 1

Loading...

ps_truncate_all_tables

This procedure truncates all Performance Schema summary tables, effectively resetting all aggregated performance statistics.

Syntax

ps_truncate_all_tables(bool display)

Description

ps_truncate_all_tables is a available with the .

The procedure resets all aggregated instrumentation as a snapshot, producing a result set indicating the number of truncated tables. The boolean parameter display specifies whether to display each statement before execution.

Examples

This page is licensed: CC BY-SA / Gnu FDL

CALL sys.ps_truncate_all_tables(false);
+---------------------+
| summary             |
+---------------------+
| Truncated 44 tables |
+---------------------+
stored procedure
Sys Schema
TRUNCATE TABLE
CALL sys.ps_truncate_all_tables(true);
+------------------------------------------------------------------+
| status                                                           |
+------------------------------------------------------------------+
| Running: TRUNCATE TABLE performance_schema.events_stages_history |
+------------------------------------------------------------------+

...

+------------------------------------------------------------------------------+
| status                                                                       |
+------------------------------------------------------------------------------+
| Running: TRUNCATE TABLE performance_schema.table_lock_waits_summary_by_table |
+------------------------------------------------------------------------------+

+---------------------+
| summary             |
+---------------------+
| Truncated 44 tables |
+---------------------+