• statement/sql : An instrumented SQL statement operation. For example, the statement/sql/ create_db  and statement/sql/select  instruments are used for CREATE DATABASE  and SELECT statements. 

## Thread Instrument Elements 

Instrumented threads are displayed in the setup_threads  table, which exposes thread class names and attributes. 

Thread instruments begin with thread  (for example, thread/sql/parser_service  or thread/ performance_schema/setup ). 

## Wait Instrument Elements 

• wait/io 

An instrumented I/O operation. 

• wait/io/file 

An instrumented file I/O operation. For files, the wait is the time waiting for the file operation to complete (for example, a call to fwrite() ). Due to caching, the physical file I/O on the disk might not happen within this call. 

• wait/io/socket 

An instrumented socket operation. Socket instruments have names of the form wait/io/socket/ sql/ socket_type . The server has a listening socket for each network protocol that it supports. The instruments associated with listening sockets for TCP/IP or Unix socket file connections have a socket_type  value of server_tcpip_socket  or server_unix_socket , respectively. When a listening socket detects a connection, the server transfers the connection to a new socket managed by a separate thread. The instrument for the new connection thread has a socket_type  value of client_connection . 

• wait/io/table 

An instrumented table I/O operation. These include row-level accesses to persistent base tables or temporary tables. Operations that affect rows are fetch, insert, update, and delete. For a view, waits are associated with base tables referenced by the view. 

Unlike most waits, a table I/O wait can include other waits. For example, table I/O might include file I/O or memory operations. Thus, events_waits_current  for a table I/O wait usually has two rows. For more information, see Section 27.8, “Performance Schema Atom and Molecule Events” . 

Some row operations might cause multiple table I/O waits. For example, an insert might activate a trigger that causes an update. 

• wait/lock 

An instrumented lock operation. 

• wait/lock/table 

An instrumented table lock operation. 

• wait/lock/metadata/sql/mdl 

