MySQL :: MySQL 8.4 Reference Manual :: 29.12.6.1 The events_statements_current Table (original) (raw)

29.12.6.1 The events_statements_current Table

The events_statements_current table contains current statement events. The table stores one row per thread showing the current status of the thread's most recent monitored statement event, so there is no system variable for configuring the table size.

Of the tables that contain statement event rows,events_statements_current is the most fundamental. Other tables that contain statement event rows are logically derived from the current events. For example, theevents_statements_history andevents_statements_history_long tables are collections of the most recent statement events that have ended, up to a maximum number of rows per thread and globally across all threads, respectively.

For more information about the relationship between the threeevents_statements_ _`xxx`_ event tables, seeSection 29.9, “Performance Schema Tables for Current and Historical Events”.

For information about configuring whether to collect statement events, seeSection 29.12.6, “Performance Schema Statement Event Tables”.

The events_statements_current table has these columns:

OBJECT_TYPE = NULL  
OBJECT_SCHEMA = NULL  
OBJECT_NAME = NULL  
NESTING_EVENT_ID = the parent transaction EVENT_ID  
NESTING_EVENT_TYPE = 'TRANSACTION'  
NESTING_LEVEL = 0  

For nested statements:

OBJECT_TYPE = the parent statement object type  
OBJECT_SCHEMA = the parent statement object schema  
OBJECT_NAME = the parent statement object name  
NESTING_EVENT_ID = the parent statement EVENT_ID  
NESTING_EVENT_TYPE = 'STATEMENT'  
NESTING_LEVEL = the parent statement NESTING_LEVEL plus one  

The events_statements_current table has these indexes:

TRUNCATE TABLE is permitted for the events_statements_current table. It removes the rows.