Performance Schema Statement Event Tables Like the  Sort_scan  status variable, but specific to the statement. 1 if the statement performed a table scan without using an index, 0 otherwise. 1 if the server found no good index to use for the statement, 0 otherwise. For additional information, see the description of the  Extra  column from  EXPLAIN  output for the  Range checked for each record  value in Section 8.8.2, “EXPLAIN Output Format” . These three columns are used with other columns to provide information as follows for top-level (unnested) statements and nested statements (executed within a stored program). For top level statements: For nested statements: The query ID maintained by the server at the SQL level. The value is unique for the server instance because these IDs are generated using a global counter that is incremented atomically. This column was added in MySQL 8.0.14. The  events_statements_current  table has these indexes: TRUNCATE TABLE  is permitted for the  events_statements_current  table. It removes the rows. The  events_statements_history  table contains the  N  most recent statement events that have ended per thread. Statement events are not added to the table until they have ended. When the table contains the maximum number of rows for a given thread, the oldest thread row is discarded when a new row for that thread is added. When a thread ends, all its rows are discarded. The Performance Schema autosizes the value of  N  during server startup. To set the number of rows per thread explicitly, set the  performance_schema_events_statements_history_size  system variable at server startup. 4977 27.12.6.2 The events_statements_history Table •Primary key on ( THREAD_ID ,  EVENT_ID ) • STATEMENT_ID • NESTING_EVENT_ID ,  NESTING_EVENT_TYPE ,  NESTING_EVENT_LEVEL • NO_GOOD_INDEX_USED • NO_INDEX_USED • SORT_SCAN OBJECT_TYPE = NULL OBJECT_SCHEMA = NULL OBJECT_NAME = NULL NESTING_EVENT_ID = NULL NESTING_EVENT_TYPE = NULL NESTING_LEVEL = 0 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