<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="sys-metrics">
      </a>
      30.4.3.21 The metrics View
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045062759680">
  </a>
  <a class="indexterm" name="idm46045062758192">
  </a>
  <p>
   This view summarizes MySQL server metrics to show variable
          names, values, types, and whether they are enabled. By
          default, rows are sorted by variable type and name.
  </p>
  <p>
   The
   <a class="link" href="sys-metrics.html" title="30.4.3.21 The metrics View">
    <code class="literal">
     metrics
    </code>
   </a>
   view includes this
          information:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Global status variables from the Performance Schema
      <a class="link" href="performance-schema-status-variable-tables.html" title="29.12.15 Performance Schema Status Variable Tables">
       <code class="literal">
        global_status
       </code>
      </a>
      table
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       InnoDB
      </code>
      metrics from the
      <code class="literal">
       INFORMATION_SCHEMA
      </code>
      <a class="link" href="information-schema-innodb-metrics-table.html" title="28.4.21 The INFORMATION_SCHEMA INNODB_METRICS Table">
       <code class="literal">
        INNODB_METRICS
       </code>
      </a>
      table
     </p>
    </li>
    <li class="listitem">
     <p>
      Current and total memory allocation, based on the
              Performance Schema memory instrumentation
     </p>
    </li>
    <li class="listitem">
     <p>
      The current time (human readable and Unix timestamp
              formats)
     </p>
    </li>
   </ul>
  </div>
  <p>
   There is some duplication of information between the
   <a class="link" href="performance-schema-status-variable-tables.html" title="29.12.15 Performance Schema Status Variable Tables">
    <code class="literal">
     global_status
    </code>
   </a>
   and
   <a class="link" href="information-schema-innodb-metrics-table.html" title="28.4.21 The INFORMATION_SCHEMA INNODB_METRICS Table">
    <code class="literal">
     INNODB_METRICS
    </code>
   </a>
   tables, which the
   <a class="link" href="sys-metrics.html" title="30.4.3.21 The metrics View">
    <code class="literal">
     metrics
    </code>
   </a>
   view eliminates.
  </p>
  <p>
   The
   <a class="link" href="sys-metrics.html" title="30.4.3.21 The metrics View">
    <code class="literal">
     metrics
    </code>
   </a>
   view has these
          columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       Variable_name
      </code>
     </p>
     <p>
      The metric name. The metric type determines the source
              from which the name is taken:
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         For global status variables: The
         <code class="literal">
          VARIABLE_NAME
         </code>
         column of the
         <a class="link" href="performance-schema-status-variable-tables.html" title="29.12.15 Performance Schema Status Variable Tables">
          <code class="literal">
           global_status
          </code>
         </a>
         table
        </p>
       </li>
       <li class="listitem">
        <p>
         For
         <code class="literal">
          InnoDB
         </code>
         metrics: The
         <code class="literal">
          NAME
         </code>
         column of the
         <a class="link" href="information-schema-innodb-metrics-table.html" title="28.4.21 The INFORMATION_SCHEMA INNODB_METRICS Table">
          <code class="literal">
           INNODB_METRICS
          </code>
         </a>
         table
        </p>
       </li>
       <li class="listitem">
        <p>
         For other metrics: A view-provided descriptive string
        </p>
       </li>
      </ul>
     </div>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Variable_value
      </code>
     </p>
     <p>
      The metric value. The metric type determines the source
              from which the value is taken:
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         For global status variables: The
         <code class="literal">
          VARIABLE_VALUE
         </code>
         column of the
         <a class="link" href="performance-schema-status-variable-tables.html" title="29.12.15 Performance Schema Status Variable Tables">
          <code class="literal">
           global_status
          </code>
         </a>
         table
        </p>
       </li>
       <li class="listitem">
        <p>
         For
         <code class="literal">
          InnoDB
         </code>
         metrics: The
         <code class="literal">
          COUNT
         </code>
         column of the
         <a class="link" href="information-schema-innodb-metrics-table.html" title="28.4.21 The INFORMATION_SCHEMA INNODB_METRICS Table">
          <code class="literal">
           INNODB_METRICS
          </code>
         </a>
         table
        </p>
       </li>
       <li class="listitem">
        <p>
         For memory metrics: The relevant column from the
                  Performance Schema
         <a class="link" href="performance-schema-memory-summary-tables.html" title="29.12.20.10 Memory Summary Tables">
          <code class="literal">
           memory_summary_global_by_event_name
          </code>
         </a>
         table
        </p>
       </li>
       <li class="listitem">
        <p>
         For the current time: The value of
         <a class="link" href="date-and-time-functions.html#function_now">
          <code class="literal">
           NOW(3)
          </code>
         </a>
         or
         <a class="link" href="date-and-time-functions.html#function_unix-timestamp">
          <code class="literal">
           UNIX_TIMESTAMP(NOW(3))
          </code>
         </a>
        </p>
       </li>
      </ul>
     </div>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Type
      </code>
     </p>
     <p>
      The metric type:
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         For global status variables:
         <code class="literal">
          Global
                  Status
         </code>
        </p>
       </li>
       <li class="listitem">
        <p>
         For
         <code class="literal">
          InnoDB
         </code>
         metrics:
         <code class="literal">
          InnoDB
                  Metrics - %
         </code>
         , where
         <code class="literal">
          %
         </code>
         is
                  replaced by the value of the
         <code class="literal">
          SUBSYSTEM
         </code>
         column of the
         <a class="link" href="information-schema-innodb-metrics-table.html" title="28.4.21 The INFORMATION_SCHEMA INNODB_METRICS Table">
          <code class="literal">
           INNODB_METRICS
          </code>
         </a>
         table
        </p>
       </li>
       <li class="listitem">
        <p>
         For memory metrics:
         <code class="literal">
          Performance
                  Schema
         </code>
        </p>
       </li>
       <li class="listitem">
        <p>
         For the current time:
         <code class="literal">
          System Time
         </code>
        </p>
       </li>
      </ul>
     </div>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Enabled
      </code>
     </p>
     <p>
      Whether the metric is enabled:
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         For global status variables:
         <code class="literal">
          YES
         </code>
        </p>
       </li>
       <li class="listitem">
        <p>
         For
         <code class="literal">
          InnoDB
         </code>
         metrics:
         <code class="literal">
          YES
         </code>
         if the
         <code class="literal">
          STATUS
         </code>
         column of the
         <a class="link" href="information-schema-innodb-metrics-table.html" title="28.4.21 The INFORMATION_SCHEMA INNODB_METRICS Table">
          <code class="literal">
           INNODB_METRICS
          </code>
         </a>
         table is
         <code class="literal">
          enabled
         </code>
         ,
         <code class="literal">
          NO
         </code>
         otherwise
        </p>
       </li>
       <li class="listitem">
        <p>
         For memory metrics:
         <code class="literal">
          NO
         </code>
         ,
         <code class="literal">
          YES
         </code>
         , or
         <code class="literal">
          PARTIAL
         </code>
         (currently,
         <code class="literal">
          PARTIAL
         </code>
         occurs only for
                  memory metrics and indicates that not all
         <code class="literal">
          memory/%
         </code>
         instruments are enabled;
                  Performance Schema memory instruments are always
                  enabled)
        </p>
       </li>
       <li class="listitem">
        <p>
         For the current time:
         <code class="literal">
          YES
         </code>
        </p>
       </li>
      </ul>
     </div>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
