<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="mysql-cluster-disk-data-storage-requirements">
      </a>
      25.6.11.2 NDB Cluster Disk Data Storage Requirements
     </h4>
    </div>
   </div>
  </div>
  <p>
   <a class="indexterm" name="idm46045091519280">
   </a>
   The following items apply to Disk Data storage requirements:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Variable-length columns of Disk Data tables take up a fixed
            amount of space. For each row, this is equal to the space
            required to store the largest possible value for that
            column.
     </p>
     <p>
      For general information about calculating these values, see
      <a class="xref" href="storage-requirements.html" title="13.7 Data Type Storage Requirements">
       Section 13.7, “Data Type Storage Requirements”
      </a>
      .
     </p>
     <p>
      You can obtain an estimate the amount of space available in
            data files and undo log files by querying the Information
            Schema
      <a class="link" href="information-schema-files-table.html" title="28.3.15 The INFORMATION_SCHEMA FILES Table">
       <code class="literal">
        FILES
       </code>
      </a>
      table. For more
            information and examples, see
      <a class="xref" href="information-schema-files-table.html" title="28.3.15 The INFORMATION_SCHEMA FILES Table">
       Section 28.3.15, “The INFORMATION_SCHEMA FILES Table”
      </a>
      .
     </p>
     <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
      <div class="admon-title">
       Note
      </div>
      <p>
       The
       <a class="link" href="optimize-table.html" title="15.7.3.4 OPTIMIZE TABLE Statement">
        <code class="literal">
         OPTIMIZE TABLE
        </code>
       </a>
       statement does not have any effect on Disk Data tables.
      </p>
     </div>
    </li>
    <li class="listitem">
     <p>
      In a Disk Data table, the first 256 bytes of a
      <a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
       <code class="literal">
        TEXT
       </code>
      </a>
      or
      <a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
       <code class="literal">
        BLOB
       </code>
      </a>
      column are stored in
            memory; only the remainder is stored on disk.
     </p>
    </li>
    <li class="listitem">
     <p>
      Each row in a Disk Data table uses 8 bytes in memory to
            point to the data stored on disk. This means that, in some
            cases, converting an in-memory column to the disk-based
            format can actually result in greater memory usage. For
            example, converting a
      <code class="literal">
       CHAR(4)
      </code>
      column from
            memory-based to disk-based format increases the amount of
      <a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-datamemory">
       <code class="literal">
        DataMemory
       </code>
      </a>
      used per
            row from 4 to 8 bytes.
     </p>
    </li>
   </ul>
  </div>
  <div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Important
   </div>
   <p>
    Starting the cluster with the
    <code class="option">
     --initial
    </code>
    option does
    <span class="emphasis">
     <em>
      not
     </em>
    </span>
    remove Disk Data files.
          You must remove these manually prior to performing an initial
          restart of the cluster.
   </p>
  </div>
  <p>
   Performance of Disk Data tables can be improved by minimizing
        the number of disk seeks by making sure that
   <a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-diskpagebuffermemory">
    <code class="literal">
     DiskPageBufferMemory
    </code>
   </a>
   is
        of sufficient size. You can query the
   <a class="link" href="mysql-cluster-ndbinfo-diskpagebuffer.html" title="25.6.17.31 The ndbinfo diskpagebuffer Table">
    <code class="literal">
     diskpagebuffer
    </code>
   </a>
   table to help
        determine whether the value for this parameter needs to be
        increased.
  </p>
 </div>
 <br/>
</div>
