21.9.5.3 The events_stages_history_long Table

The events_stages_history_long
table contains the most recent N
stage events. The value of N is
autosized at server startup. To set the table size explicitly,
set the
performance_schema_events_stages_history_long_size
system variable at server startup. Stage events are not added
to the table until they have ended. As new events are added,
older events are discarded if the table is full. When a thread
ends, its rows are removed from the table.