<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="information-schema-innodb-cmp-table">
      </a>
      28.4.6 The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045077299632">
  </a>
  <a class="indexterm" name="idm46045077298176">
  </a>
  <p>
   The
   <a class="link" href="information-schema-innodb-cmp-table.html" title="28.4.6 The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables">
    <code class="literal">
     INNODB_CMP
    </code>
   </a>
   and
   <a class="link" href="information-schema-innodb-cmp-table.html" title="28.4.6 The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables">
    <code class="literal">
     INNODB_CMP_RESET
    </code>
   </a>
   tables provide
      status information on operations related to
   <a class="link" href="glossary.html#glos_compression" title="compression">
    compressed
   </a>
   <code class="literal">
    InnoDB
   </code>
   tables.
  </p>
  <p>
   The
   <a class="link" href="information-schema-innodb-cmp-table.html" title="28.4.6 The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables">
    <code class="literal">
     INNODB_CMP
    </code>
   </a>
   and
   <a class="link" href="information-schema-innodb-cmp-table.html" title="28.4.6 The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables">
    <code class="literal">
     INNODB_CMP_RESET
    </code>
   </a>
   tables have these
      columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       PAGE_SIZE
      </code>
     </p>
     <p>
      The compressed page size in bytes.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       COMPRESS_OPS
      </code>
     </p>
     <p>
      The number of times a B-tree page of size
      <code class="literal">
       PAGE_SIZE
      </code>
      has been compressed. Pages are
          compressed whenever an empty page is created or the space for
          the uncompressed modification log runs out.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       COMPRESS_OPS_OK
      </code>
     </p>
     <p>
      The number of times a B-tree page of size
      <code class="literal">
       PAGE_SIZE
      </code>
      has been successfully compressed.
          This count should never exceed
      <code class="literal">
       COMPRESS_OPS
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       COMPRESS_TIME
      </code>
     </p>
     <p>
      The total time in seconds used for attempts to compress B-tree
          pages of size
      <code class="literal">
       PAGE_SIZE
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       UNCOMPRESS_OPS
      </code>
     </p>
     <p>
      The number of times a B-tree page of size
      <code class="literal">
       PAGE_SIZE
      </code>
      has been uncompressed. B-tree
          pages are uncompressed whenever compression fails or at first
          access when the uncompressed page does not exist in the buffer
          pool.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       UNCOMPRESS_TIME
      </code>
     </p>
     <p>
      The total time in seconds used for uncompressing B-tree pages
          of the size
      <code class="literal">
       PAGE_SIZE
      </code>
      .
     </p>
    </li>
   </ul>
  </div>
  <h4>
   <a name="idm46045077272512">
   </a>
   Example
  </h4>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa50989768"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span>INNODB_CMP\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
      page_size<span class="token punctuation">:</span> 1024
   compress_ops<span class="token punctuation">:</span> 0
compress_ops_ok<span class="token punctuation">:</span> 0
  compress_time<span class="token punctuation">:</span> 0
 uncompress_ops<span class="token punctuation">:</span> 0
uncompress_time<span class="token punctuation">:</span> 0
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 2. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
      page_size<span class="token punctuation">:</span> 2048
   compress_ops<span class="token punctuation">:</span> 0
compress_ops_ok<span class="token punctuation">:</span> 0
  compress_time<span class="token punctuation">:</span> 0
 uncompress_ops<span class="token punctuation">:</span> 0
uncompress_time<span class="token punctuation">:</span> 0
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 3. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
      page_size<span class="token punctuation">:</span> 4096
   compress_ops<span class="token punctuation">:</span> 0
compress_ops_ok<span class="token punctuation">:</span> 0
  compress_time<span class="token punctuation">:</span> 0
 uncompress_ops<span class="token punctuation">:</span> 0
uncompress_time<span class="token punctuation">:</span> 0
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 4. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
      page_size<span class="token punctuation">:</span> 8192
   compress_ops<span class="token punctuation">:</span> 86955
compress_ops_ok<span class="token punctuation">:</span> 81182
  compress_time<span class="token punctuation">:</span> 27
 uncompress_ops<span class="token punctuation">:</span> 26828
uncompress_time<span class="token punctuation">:</span> 5
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 5. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
      page_size<span class="token punctuation">:</span> 16384
   compress_ops<span class="token punctuation">:</span> 0
compress_ops_ok<span class="token punctuation">:</span> 0
  compress_time<span class="token punctuation">:</span> 0
 uncompress_ops<span class="token punctuation">:</span> 0
uncompress_time<span class="token punctuation">:</span> 0</span></code></pre>
  </div>
  <h4>
   <a name="idm46045077269248">
   </a>
   Notes
  </h4>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Use these tables to measure the effectiveness of
      <code class="literal">
       InnoDB
      </code>
      table
      <a class="link" href="glossary.html#glos_compression" title="compression">
       compression
      </a>
      in your
          database.
     </p>
    </li>
    <li class="listitem">
     <p>
      You must have the
      <a class="link" href="privileges-provided.html#priv_process">
       <code class="literal">
        PROCESS
       </code>
      </a>
      privilege to query this table.
     </p>
    </li>
    <li class="listitem">
     <p>
      Use the
      <code class="literal">
       INFORMATION_SCHEMA
      </code>
      <a class="link" href="information-schema-columns-table.html" title="28.3.8 The INFORMATION_SCHEMA COLUMNS Table">
       <code class="literal">
        COLUMNS
       </code>
      </a>
      table or the
      <a class="link" href="show-columns.html" title="15.7.7.6 SHOW COLUMNS Statement">
       <code class="literal">
        SHOW COLUMNS
       </code>
      </a>
      statement to view
          additional information about the columns of this table,
          including data types and default values.
     </p>
    </li>
    <li class="listitem">
     <p>
      For usage information, see
      <a class="xref" href="innodb-compression-tuning-monitoring.html" title="17.9.1.4 Monitoring InnoDB Table Compression at Runtime">
       Section 17.9.1.4, “Monitoring InnoDB Table Compression at Runtime”
      </a>
      and
      <a class="xref" href="innodb-information-schema-examples-compression-sect.html" title="17.15.1.3 Using the Compression Information Schema Tables">
       Section 17.15.1.3, “Using the Compression Information Schema Tables”
      </a>
      .
          For general information about
      <code class="literal">
       InnoDB
      </code>
      table
          compression, see
      <a class="xref" href="innodb-compression.html" title="17.9 InnoDB Table and Page Compression">
       Section 17.9, “InnoDB Table and Page Compression”
      </a>
      .
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
