<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="deleting-from-related-tables">
      </a>
      B.3.4.6 Deleting Rows from Related Tables
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045053488688">
  </a>
  <a class="indexterm" name="idm46045053487232">
  </a>
  <a class="indexterm" name="idm46045053485744">
  </a>
  <p>
   If the total length of the
   <a class="link" href="delete.html" title="15.2.2 DELETE Statement">
    <code class="literal">
     DELETE
    </code>
   </a>
   statement for
   <code class="literal">
    related_table
   </code>
   is more than the default
          value of the
   <a class="link" href="server-system-variables.html#sysvar_max_allowed_packet">
    <code class="literal">
     max_allowed_packet
    </code>
   </a>
   system
          variable, you should split it into smaller parts and execute
          multiple
   <a class="link" href="delete.html" title="15.2.2 DELETE Statement">
    <code class="literal">
     DELETE
    </code>
   </a>
   statements. You
          probably get the fastest
   <a class="link" href="delete.html" title="15.2.2 DELETE Statement">
    <code class="literal">
     DELETE
    </code>
   </a>
   by specifying only 100 to 1,000
   <code class="literal">
    related_column
   </code>
   values per statement if the
   <code class="literal">
    related_column
   </code>
   is indexed. If the
   <code class="literal">
    related_column
   </code>
   is not indexed, the speed is
          independent of the number of arguments in the
   <code class="literal">
    IN
   </code>
   clause.
  </p>
 </div>
 <br/>
</div>
