<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="performance-schema-socket-summary-tables">
      </a>
      29.12.20.9 Socket Summary Tables
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045068255632">
  </a>
  <a class="indexterm" name="idm46045068254128">
  </a>
  <a class="indexterm" name="idm46045068252624">
  </a>
  <a class="indexterm" name="idm46045068251120">
  </a>
  <p>
   These socket summary tables aggregate timer and byte count
          information for socket operations:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="link" href="performance-schema-socket-summary-tables.html" title="29.12.20.9 Socket Summary Tables">
       <code class="literal">
        socket_summary_by_event_name
       </code>
      </a>
      :
              Aggregate timer and byte count statistics generated by the
      <code class="literal">
       wait/io/socket/*
      </code>
      instruments for all
              socket I/O operations, per socket instrument.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="performance-schema-socket-summary-tables.html" title="29.12.20.9 Socket Summary Tables">
       <code class="literal">
        socket_summary_by_instance
       </code>
      </a>
      :
              Aggregate timer and byte count statistics generated by the
      <code class="literal">
       wait/io/socket/*
      </code>
      instruments for all
              socket I/O operations, per socket instance. When a
              connection terminates, the row in
      <a class="link" href="performance-schema-socket-summary-tables.html" title="29.12.20.9 Socket Summary Tables">
       <code class="literal">
        socket_summary_by_instance
       </code>
      </a>
      corresponding to it is deleted.
     </p>
    </li>
   </ul>
  </div>
  <p>
   The socket summary tables do not aggregate waits generated by
   <code class="literal">
    idle
   </code>
   events while sockets are waiting for
          the next request from the client. For
   <code class="literal">
    idle
   </code>
   event aggregations, use the wait-event summary tables; see
   <a class="xref" href="performance-schema-wait-summary-tables.html" title="29.12.20.1 Wait Event Summary Tables">
    Section 29.12.20.1, “Wait Event Summary Tables”
   </a>
   .
  </p>
  <p>
   Each socket summary table has one or more grouping columns to
          indicate how the table aggregates events. Event names refer to
          names of event instruments in the
   <a class="link" href="performance-schema-setup-instruments-table.html" title="29.12.2.3 The setup_instruments Table">
    <code class="literal">
     setup_instruments
    </code>
   </a>
   table:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="link" href="performance-schema-socket-summary-tables.html" title="29.12.20.9 Socket Summary Tables">
       <code class="literal">
        socket_summary_by_event_name
       </code>
      </a>
      has an
      <code class="literal">
       EVENT_NAME
      </code>
      column. Each row
              summarizes events for a given event name.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="performance-schema-socket-summary-tables.html" title="29.12.20.9 Socket Summary Tables">
       <code class="literal">
        socket_summary_by_instance
       </code>
      </a>
      has an
      <code class="literal">
       OBJECT_INSTANCE_BEGIN
      </code>
      column.
              Each row summarizes events for a given object.
     </p>
    </li>
   </ul>
  </div>
  <p>
   Each socket summary table has these summary columns containing
          aggregated values:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       COUNT_STAR
      </code>
      ,
      <code class="literal">
       SUM_TIMER_WAIT
      </code>
      ,
      <code class="literal">
       MIN_TIMER_WAIT
      </code>
      ,
      <code class="literal">
       AVG_TIMER_WAIT
      </code>
      ,
      <code class="literal">
       MAX_TIMER_WAIT
      </code>
     </p>
     <p>
      These columns aggregate all operations.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       COUNT_READ
      </code>
      ,
      <code class="literal">
       SUM_TIMER_READ
      </code>
      ,
      <code class="literal">
       MIN_TIMER_READ
      </code>
      ,
      <code class="literal">
       AVG_TIMER_READ
      </code>
      ,
      <code class="literal">
       MAX_TIMER_READ
      </code>
      ,
      <code class="literal">
       SUM_NUMBER_OF_BYTES_READ
      </code>
     </p>
     <p>
      These columns aggregate all receive operations
              (
      <code class="literal">
       RECV
      </code>
      ,
      <code class="literal">
       RECVFROM
      </code>
      , and
      <code class="literal">
       RECVMSG
      </code>
      ).
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       COUNT_WRITE
      </code>
      ,
      <code class="literal">
       SUM_TIMER_WRITE
      </code>
      ,
      <code class="literal">
       MIN_TIMER_WRITE
      </code>
      ,
      <code class="literal">
       AVG_TIMER_WRITE
      </code>
      ,
      <code class="literal">
       MAX_TIMER_WRITE
      </code>
      ,
      <code class="literal">
       SUM_NUMBER_OF_BYTES_WRITE
      </code>
     </p>
     <p>
      These columns aggregate all send operations
              (
      <code class="literal">
       SEND
      </code>
      ,
      <code class="literal">
       SENDTO
      </code>
      , and
      <code class="literal">
       SENDMSG
      </code>
      ).
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       COUNT_MISC
      </code>
      ,
      <code class="literal">
       SUM_TIMER_MISC
      </code>
      ,
      <code class="literal">
       MIN_TIMER_MISC
      </code>
      ,
      <code class="literal">
       AVG_TIMER_MISC
      </code>
      ,
      <code class="literal">
       MAX_TIMER_MISC
      </code>
     </p>
     <p>
      These columns aggregate all other socket operations, such
              as
      <code class="literal">
       CONNECT
      </code>
      ,
      <code class="literal">
       LISTEN
      </code>
      ,
      <code class="literal">
       ACCEPT
      </code>
      ,
      <code class="literal">
       CLOSE
      </code>
      , and
      <code class="literal">
       SHUTDOWN
      </code>
      . There are no byte counts for
              these operations.
     </p>
    </li>
   </ul>
  </div>
  <p>
   The
   <a class="link" href="performance-schema-socket-summary-tables.html" title="29.12.20.9 Socket Summary Tables">
    <code class="literal">
     socket_summary_by_instance
    </code>
   </a>
   table also has an
   <code class="literal">
    EVENT_NAME
   </code>
   column that
          indicates the class of the socket:
   <code class="literal">
    client_connection
   </code>
   ,
   <code class="literal">
    server_tcpip_socket
   </code>
   ,
   <code class="literal">
    server_unix_socket
   </code>
   . This column can be
          grouped on to isolate, for example, client activity from that
          of the server listening sockets.
  </p>
  <p>
   The socket summary tables have these indexes:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="link" href="performance-schema-socket-summary-tables.html" title="29.12.20.9 Socket Summary Tables">
       <code class="literal">
        socket_summary_by_event_name
       </code>
      </a>
      :
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         Primary key on (
         <code class="literal">
          EVENT_NAME
         </code>
         )
        </p>
       </li>
      </ul>
     </div>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="performance-schema-socket-summary-tables.html" title="29.12.20.9 Socket Summary Tables">
       <code class="literal">
        socket_summary_by_instance
       </code>
      </a>
      :
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         Primary key on
                  (
         <code class="literal">
          OBJECT_INSTANCE_BEGIN
         </code>
         )
        </p>
       </li>
       <li class="listitem">
        <p>
         Index on (
         <code class="literal">
          EVENT_NAME
         </code>
         )
        </p>
       </li>
      </ul>
     </div>
    </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 permitted for
          socket summary tables. Except for
   <a class="link" href="performance-schema-statement-summary-tables.html" title="29.12.20.3 Statement Summary Tables">
    <code class="literal">
     events_statements_summary_by_digest
    </code>
   </a>
   ,
          it resets the summary columns to zero rather than removing
          rows.
  </p>
 </div>
 <br/>
</div>
