PDF (A4) - 43.4Mb
Man Pages (TGZ) - 297.3Kb
Man Pages (Zip) - 402.5Kb
Info (Gzip) - 4.3Mb
Info (Zip) - 4.3Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
Security in MySQL
Starting and Stopping MySQL
MySQL and Linux/Unix
MySQL and Windows
MySQL and macOS
MySQL and Solaris
Building MySQL from Source
MySQL Restrictions and Limitations
MySQL Partitioning
MySQL Tutorial
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL NDB Cluster 8.0
An instrument name consists of a sequence of elements separated by'/' characters. Example names:
wait/io/file/myisam/logwait/io/file/mysys/charsetwait/lock/table/sql/handlerwait/synch/cond/mysys/COND_alarmwait/synch/cond/sql/BINLOG::update_condwait/synch/mutex/mysys/BITMAP_mutexwait/synch/mutex/sql/LOCK_deletewait/synch/rwlock/sql/Query_cache_query::lockstage/sql/closing tablesstage/sql/Sorting resultstatement/com/Executestatement/com/Querystatement/sql/create_tablestatement/sql/lock_tableserrorsThe instrument name space has a tree-like structure. The elements of an instrument name from left to right provide a progression from more general to more specific. The number of elements a name has depends on the type of instrument.
The interpretation of a given element in a name depends on the elements to the left of it. For example,myisam appears in both of the following names, butmyisam in the first name is related to file I/O, whereas in the second it is related to a synchronization instrument:
wait/io/file/myisam/logwait/synch/cond/myisam/MI_SORT_INFO::cond Instrument names consist of a prefix with a structure defined by the Performance Schema implementation and a suffix defined by the developer implementing the instrument code. The top-level element of an instrument prefix indicates the type of instrument. This element also determines which event timer in theperformance_timers table applies to the instrument. For the prefix part of instrument names, the top level indicates the type of instrument.
The suffix part of instrument names comes from the code for the instruments themselves. Suffixes may include levels such as these:
A name for the major element (a server module such as
myisam,innodb,mysys, orsql) or a plugin name.The name of a variable in the code, in the form
XXX(a global variable) or(a memberCCC::MMMMMMin classCCC). Examples:COND_thread_cache,THR_LOCK_myisam,BINLOG::LOCK_index.
idle: An instrumented idle event. This instrument has no further elements.error: An instrumented error event. This instrument has no further elements.memory: An instrumented memory event.stage: An instrumented stage event.statement: An instrumented statement event.transaction: An instrumented transaction event. This instrument has no further elements.wait: An instrumented wait event.
Theidle instrument is used for idle events, which The Performance Schema generates as discussed in the description of thesocket_instances.STATE column inSection 29.12.3.5, “The socket_instances Table”.
Theerror instrument indicates whether to collect information for server errors and warnings. This instrument is enabled by default. TheTIMED column for theerror row in thesetup_instruments table is inapplicable because timing information is not collected.
Memory instrumentation is enabled by default. Memory instrumentation can be enabled or disabled at startup, or dynamically at runtime by updating theENABLED column of the relevant instruments in thesetup_instruments table. Memory instruments have names of the formmemory/ wherecode_area/instrument_namecode_area is a value such assql ormyisam, andinstrument_name is the instrument detail.
Instruments named with the prefixmemory/performance_schema/ expose how much memory is allocated for internal buffers in the Performance Schema. Thememory/performance_schema/ instruments are built in, always enabled, and cannot be disabled at startup or runtime. Built-in memory instruments are displayed only in thememory_summary_global_by_event_name table. For more information, seeSection 29.17, “The Performance Schema Memory-Allocation Model”.
Stage instruments have names of the formstage/, wherecode_area/stage_namecode_area is a value such assql ormyisam, andstage_name indicates the stage of statement processing, such asSorting result orSending data. Stages correspond to the thread states displayed bySHOW PROCESSLIST or that are visible in the Information SchemaPROCESSLIST table.
statement/abstract/*: An abstract instrument for statement operations. Abstract instruments are used during the early stages of statement classification before the exact statement type is known, then changed to a more specific statement instrument when the type is known. For a description of this process, seeSection 29.12.6, “Performance Schema Statement Event Tables”.statement/com: An instrumented command operation. These have names corresponding toCOM_operations (see thexxxmysql_com.hheader file andsql/sql_parse.cc. For example, thestatement/com/Connectandstatement/com/Init DBinstruments correspond to theCOM_CONNECTandCOM_INIT_DBcommands.statement/scheduler/event: A single instrument to track all events executed by the Event Scheduler. This instrument comes into play when a scheduled event begins executing.statement/sp: An instrumented internal instruction executed by a stored program. For example, thestatement/sp/cfetchandstatement/sp/freturninstruments are used cursor fetch and function return instructions.statement/sql: An instrumented SQL statement operation. For example, thestatement/sql/create_dbandstatement/sql/selectinstruments are used forCREATE DATABASEandSELECTstatements.
Instrumented threads are displayed in thesetup_threads table, which exposes thread class names and attributes.
Thread instruments begin withthread (for example,thread/sql/parser_service orthread/performance_schema/setup).
The names of thread instruments forndbcluster plugin threads begin withthread/ndbcluster/; for more information about these, seendbcluster Plugin Threads.
wait/ioAn instrumented I/O operation.
wait/io/fileAn 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/socketAn instrumented socket operation. Socket instruments have names of the form
wait/io/socket/sql/. 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 asocket_typesocket_typevalue ofserver_tcpip_socketorserver_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 asocket_typevalue ofclient_connection.wait/io/tableAn 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_currentfor a table I/O wait usually has two rows. For more information, seeSection 29.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/lockAn instrumented lock operation.
wait/lock/tableAn instrumented table lock operation.
wait/lock/metadata/sql/mdlAn instrumented metadata lock operation.
wait/synchAn instrumented synchronization object. For synchronization objects, the
TIMER_WAITtime includes the amount of time blocked while attempting to acquire a lock on the object, if any.wait/synch/condA condition is used by one thread to signal to other threads that something they were waiting for has happened. If a single thread was waiting for a condition, it can wake up and proceed with its execution. If several threads were waiting, they can all wake up and compete for the resource for which they were waiting.
wait/synch/mutexA mutual exclusion object used to permit access to a resource (such as a section of executable code) while preventing other threads from accessing the resource.
wait/synch/prlockA priorityrwlock lock object.
wait/synch/rwlockA plainread/write lock object used to lock a specific variable for access while preventing its use by other threads. A shared read lock can be acquired simultaneously by multiple threads. An exclusive write lock can be acquired by only one thread at a time.
wait/synch/sxlockA shared-exclusive (SX) lock is a type ofrwlock lock object that provides write access to a common resource while permitting inconsistent reads by other threads.
sxlocksoptimize concurrency and improve scalability for read-write workloads.
PDF (A4) - 43.4Mb
Man Pages (TGZ) - 297.3Kb
Man Pages (Zip) - 402.5Kb
Info (Gzip) - 4.3Mb
Info (Zip) - 4.3Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
Security in MySQL
Starting and Stopping MySQL
MySQL and Linux/Unix
MySQL and Windows
MySQL and macOS
MySQL and Solaris
Building MySQL from Source
MySQL Restrictions and Limitations
MySQL Partitioning
MySQL Tutorial
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL NDB Cluster 8.0