<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="performance-schema-file-instances-table">
      </a>
      29.12.3.2 The file_instances Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045073578448">
  </a>
  <a class="indexterm" name="idm46045073576960">
  </a>
  <p>
   The
   <a class="link" href="performance-schema-file-instances-table.html" title="29.12.3.2 The file_instances Table">
    <code class="literal">
     file_instances
    </code>
   </a>
   table lists
          all the files seen by the Performance Schema when executing
          file I/O instrumentation. If a file on disk has never been
          opened, it is not shown in
   <a class="link" href="performance-schema-file-instances-table.html" title="29.12.3.2 The file_instances Table">
    <code class="literal">
     file_instances
    </code>
   </a>
   . When a file is
          deleted from the disk, it is also removed from the
   <a class="link" href="performance-schema-file-instances-table.html" title="29.12.3.2 The file_instances Table">
    <code class="literal">
     file_instances
    </code>
   </a>
   table.
  </p>
  <p>
   The
   <a class="link" href="performance-schema-file-instances-table.html" title="29.12.3.2 The file_instances Table">
    <code class="literal">
     file_instances
    </code>
   </a>
   table has
          these columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       FILE_NAME
      </code>
     </p>
     <p>
      The file name.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       EVENT_NAME
      </code>
     </p>
     <p>
      The instrument name associated with the file.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       OPEN_COUNT
      </code>
     </p>
     <p>
      The count of open handles on the file. If a file was
              opened and then closed, it was opened 1 time, but
      <code class="literal">
       OPEN_COUNT
      </code>
      is 0. To list all the files
              currently opened by the server, use
      <code class="literal">
       WHERE
              OPEN_COUNT &gt; 0
      </code>
      .
     </p>
    </li>
   </ul>
  </div>
  <p>
   The
   <a class="link" href="performance-schema-file-instances-table.html" title="29.12.3.2 The file_instances Table">
    <code class="literal">
     file_instances
    </code>
   </a>
   table has
          these indexes:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Primary key on (
      <code class="literal">
       FILE_NAME
      </code>
      )
     </p>
    </li>
    <li class="listitem">
     <p>
      Index on (
      <code class="literal">
       EVENT_NAME
      </code>
      )
     </p>
    </li>
   </ul>
  </div>
  <p>
   <a class="link" href="truncate-table.html" title="15.1.37 TRUNCATE TABLE Statement">
    <code class="literal">
     TRUNCATE TABLE
    </code>
   </a>
   is not permitted
          for the
   <a class="link" href="performance-schema-file-instances-table.html" title="29.12.3.2 The file_instances Table">
    <code class="literal">
     file_instances
    </code>
   </a>
   table.
  </p>
 </div>
 <br/>
</div>
