<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="information-schema-innodb-cmpmem-table">
      </a>
      28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045077254480">
  </a>
  <a class="indexterm" name="idm46045077253024">
  </a>
  <p>
   The
   <a class="link" href="information-schema-innodb-cmpmem-table.html" title="28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables">
    <code class="literal">
     INNODB_CMPMEM
    </code>
   </a>
   and
   <a class="link" href="information-schema-innodb-cmpmem-table.html" title="28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables">
    <code class="literal">
     INNODB_CMPMEM_RESET
    </code>
   </a>
   tables provide
      status information on compressed
   <a class="link" href="glossary.html#glos_page" title="page">
    pages
   </a>
   within the
   <code class="literal">
    InnoDB
   </code>
   <a class="link" href="glossary.html#glos_buffer_pool" title="buffer pool">
    buffer
      pool
   </a>
   .
  </p>
  <p>
   The
   <a class="link" href="information-schema-innodb-cmpmem-table.html" title="28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables">
    <code class="literal">
     INNODB_CMPMEM
    </code>
   </a>
   and
   <a class="link" href="information-schema-innodb-cmpmem-table.html" title="28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables">
    <code class="literal">
     INNODB_CMPMEM_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 block size in bytes. Each record of this table describes
          blocks of this size.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       BUFFER_POOL_INSTANCE
      </code>
     </p>
     <p>
      A unique identifier for the buffer pool instance.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       PAGES_USED
      </code>
     </p>
     <p>
      The number of blocks of size
      <code class="literal">
       PAGE_SIZE
      </code>
      that
          are currently in use.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       PAGES_FREE
      </code>
     </p>
     <p>
      The number of blocks of size
      <code class="literal">
       PAGE_SIZE
      </code>
      that
          are currently available for allocation. This column shows the
          external fragmentation in the memory pool. Ideally, these
          numbers should be at most 1.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       RELOCATION_OPS
      </code>
     </p>
     <p>
      The number of times a block of size
      <code class="literal">
       PAGE_SIZE
      </code>
      has been relocated. The buddy
          system can relocate the allocated
      <span class="quote">
       “
       <span class="quote">
        buddy
          neighbor
       </span>
       ”
      </span>
      of a freed block when it tries to form a
          bigger freed block. Reading from the
      <a class="link" href="information-schema-innodb-cmpmem-table.html" title="28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables">
       <code class="literal">
        INNODB_CMPMEM_RESET
       </code>
      </a>
      table resets
          this count.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       RELOCATION_TIME
      </code>
     </p>
     <p>
      The total time in microseconds used for relocating blocks of
          size
      <code class="literal">
       PAGE_SIZE
      </code>
      . Reading from the table
      <code class="literal">
       INNODB_CMPMEM_RESET
      </code>
      resets this count.
     </p>
    </li>
   </ul>
  </div>
  <h4>
   <a name="idm46045077225536">
   </a>
   Example
  </h4>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa38165910"><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_CMPMEM\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
buffer_pool_instance<span class="token punctuation">:</span> 0
          pages_used<span class="token punctuation">:</span> 0
          pages_free<span class="token punctuation">:</span> 0
      relocation_ops<span class="token punctuation">:</span> 0
     relocation_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
buffer_pool_instance<span class="token punctuation">:</span> 0
          pages_used<span class="token punctuation">:</span> 0
          pages_free<span class="token punctuation">:</span> 0
      relocation_ops<span class="token punctuation">:</span> 0
     relocation_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
buffer_pool_instance<span class="token punctuation">:</span> 0
          pages_used<span class="token punctuation">:</span> 0
          pages_free<span class="token punctuation">:</span> 0
      relocation_ops<span class="token punctuation">:</span> 0
     relocation_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
buffer_pool_instance<span class="token punctuation">:</span> 0
          pages_used<span class="token punctuation">:</span> 7673
          pages_free<span class="token punctuation">:</span> 15
      relocation_ops<span class="token punctuation">:</span> 4638
     relocation_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> 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
buffer_pool_instance<span class="token punctuation">:</span> 0
          pages_used<span class="token punctuation">:</span> 0
          pages_free<span class="token punctuation">:</span> 0
      relocation_ops<span class="token punctuation">:</span> 0
     relocation_time<span class="token punctuation">:</span> 0</span></code></pre>
  </div>
  <h4>
   <a name="idm46045077222128">
   </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>
