<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="foreign-key-optimization">
      </a>
      10.3.4 Foreign Key Optimization
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045227474336">
  </a>
  <p>
   If a table has many columns, and you query many different
        combinations of columns, it might be efficient to split the
        less-frequently used data into separate tables with a few
        columns each, and relate them back to the main table by
        duplicating the numeric ID column from the main table. That way,
        each small table can have a primary key for fast lookups of its
        data, and you can query just the set of columns that you need
        using a join operation. Depending on how the data is
        distributed, the queries might perform less I/O and take up less
        cache memory because the relevant columns are packed together on
        disk. (To maximize performance, queries try to read as few data
        blocks as possible from disk; tables with only a few columns can
        fit more rows in each data block.)
  </p>
 </div>
 <br/>
</div>
