The file name. 

• EVENT_NAME 

The instrument name associated with the file. 

• OPEN_COUNT 

The count of open handles on the file. If a file was opened and then closed, it was opened 1 time, but OPEN_COUNT  is 0. To list all the files currently opened by the server, use WHERE OPEN_COUNT > 0 . 

## 27.12.3.3 The mutex_instances Table 

The file_instances  table has these indexes: 

•Primary key on ( FILE_NAME ) 

•Index on ( EVENT_NAME ) 

TRUNCATE TABLE  is not permitted for the file_instances  table. 

The mutex_instances  table lists all the mutexes seen by the Performance Schema while the server executes. A mutex is a synchronization mechanism used in the code to enforce that only one thread at a given time can have access to some common resource. The resource is said to be “protected”  by the mutex. 

When two threads executing in the server (for example, two user sessions executing a query simultaneously) do need to access the same resource (a file, a buffer, or some piece of data), these two threads compete against each other, so that the first query to obtain a lock on the mutex causes the other query to wait until the first is done and unlocks the mutex. 

The work performed while holding a mutex is said to be in a “critical section,”  and multiple queries do execute this critical section in a serialized way (one at a time), which is a potential bottleneck. 

The mutex_instances  table has these columns: 

## • NAME 

The instrument name associated with the mutex. 

## • OBJECT_INSTANCE_BEGIN 

The address in memory of the instrumented mutex. 

## • LOCKED_BY_THREAD_ID 

When a thread currently has a mutex locked, LOCKED_BY_THREAD_ID  is the THREAD_ID  of the locking thread, otherwise it is NULL . 

The mutex_instances  table has these indexes: 

•Primary key on ( OBJECT_INSTANCE_BEGIN ) 

•Index on ( NAME ) 

•Index on ( LOCKED_BY_THREAD_ID ) 

TRUNCATE TABLE  is not permitted for the mutex_instances  table. 

