<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="performance-schema-hosts-table">
      </a>
      29.12.8.2 The hosts Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045072068768">
  </a>
  <a class="indexterm" name="idm46045072067280">
  </a>
  <p>
   The
   <a class="link" href="performance-schema-hosts-table.html" title="29.12.8.2 The hosts Table">
    <code class="literal">
     hosts
    </code>
   </a>
   table contains a row
          for each host from which clients have connected to the MySQL
          server. For each host name, the table counts the current and
          total number of connections. The table size is autosized at
          server startup. To set the table size explicitly, set the
   <a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_hosts_size">
    <code class="literal">
     performance_schema_hosts_size
    </code>
   </a>
   system variable at server startup. To disable host statistics,
          set this variable to 0.
  </p>
  <p>
   The
   <a class="link" href="performance-schema-hosts-table.html" title="29.12.8.2 The hosts Table">
    <code class="literal">
     hosts
    </code>
   </a>
   table has the following
          columns. For a description of how the Performance Schema
          maintains rows in this table, including the effect of
   <a class="link" href="truncate-table.html" title="15.1.37 TRUNCATE TABLE Statement">
    <code class="literal">
     TRUNCATE TABLE
    </code>
   </a>
   , see
   <a class="xref" href="performance-schema-connection-tables.html" title="29.12.8 Performance Schema Connection Tables">
    Section 29.12.8, “Performance Schema Connection Tables”
   </a>
   .
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       HOST
      </code>
     </p>
     <p>
      The host from which the client connected. This is
      <code class="literal">
       NULL
      </code>
      for an internal thread, or for a
              user session that failed to authenticate.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       CURRENT_CONNECTIONS
      </code>
     </p>
     <p>
      The current number of connections for the host.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       TOTAL_CONNECTIONS
      </code>
     </p>
     <p>
      The total number of connections for the host.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       MAX_SESSION_CONTROLLED_MEMORY
      </code>
     </p>
     <p>
      Reports the maximum amount of controlled memory used by a
              session belonging to the host.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       MAX_SESSION_TOTAL_MEMORY
      </code>
     </p>
     <p>
      Reports the maximum amount of memory used by a session
              belonging to the host.
     </p>
    </li>
   </ul>
  </div>
  <p>
   The
   <a class="link" href="performance-schema-hosts-table.html" title="29.12.8.2 The hosts Table">
    <code class="literal">
     hosts
    </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">
       HOST
      </code>
      )
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
