Performance Schema Wait Event Tables The  socket_instances  table has these indexes: TRUNCATE TABLE  is not permitted for the  socket_instances  table. The  IP:PORT  column combination value identifies the connection. This combination value is used in the OBJECT_NAME  column of the  events_waits_ xxx  tables, to identify the connection from which socket events come: The Performance Schema instruments waits, which are events that take time. Within the event hierarchy, wait events nest within stage events, which nest within statement events, which nest within transaction events. These tables store wait events: The following sections describe the wait event tables. There are also summary tables that aggregate information about wait events; see Section 27.12.20.1, “Wait Event Summary Tables” . For more information about the relationship between the three wait event tables, see Section 27.9, “Performance Schema Tables for Current and Historical Events” . To control whether to collect wait events, set the state of the relevant instruments and consumers: Configuring Wait Event Collection 27.12.4 Performance Schema Wait Event Tables •Primary key on ( OBJECT_INSTANCE_BEGIN ) •Index on ( THREAD_ID ) •Index on ( SOCKET_ID ) •Index on ( IP ,  PORT ) •For the Unix domain listener socket ( server_unix_socket ), the port is 0, and the IP is  ’’ . •For client connections via the Unix domain listener ( client_connection ), the port is 0, and the IP is ’’ . •For the TCP/IP server listener socket ( server_tcpip_socket ), the port is always the master port (for example, 3306), and the IP is always  0.0.0.0 . •For client connections via the TCP/IP listener ( client_connection ), the port is whatever the server assigns, but never 0. The IP is the IP of the originating host ( 127.0.0.1  or  ::1  for the local host) • events_waits_current : The current wait event for each thread. • events_waits_history : The most recent wait events that have ended per thread. • events_waits_history_long : The most recent wait events that have ended globally (across all threads). •The  setup_instruments  table contains instruments with names that begin with  wait . Use these instruments to enable or disable collection of individual wait event classes. •The  setup_consumers  table contains consumer values with names corresponding to the current and historical wait event table names. Use these consumers to filter collection of wait events. 4958