<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h2 class="title">
      <a name="execution-plan-information">
      </a>
      10.8 Understanding the Query Execution Plan
     </h2>
    </div>
   </div>
  </div>
  <div class="toc">
   <dl class="toc">
    <dt>
     <span class="section">
      <a href="using-explain.html">
       10.8.1 Optimizing Queries with EXPLAIN
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="explain-output.html">
       10.8.2 EXPLAIN Output Format
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="explain-extended.html">
       10.8.3 Extended EXPLAIN Output Format
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="explain-for-connection.html">
       10.8.4 Obtaining Execution Plan Information for a Named Connection
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="estimating-performance.html">
       10.8.5 Estimating Query Performance
      </a>
     </span>
    </dt>
   </dl>
  </div>
  <p>
   Depending on the details of your tables, columns, indexes, and the
      conditions in your
   <code class="literal">
    WHERE
   </code>
   clause, the MySQL
      optimizer considers many techniques to efficiently perform the
      lookups involved in an SQL query. A query on a huge table can be
      performed without reading all the rows; a join involving several
      tables can be performed without comparing every combination of
      rows. The set of operations that the optimizer chooses to perform
      the most efficient query is called the
   <span class="quote">
    “
    <span class="quote">
     query execution
      plan
    </span>
    ”
   </span>
   , also known as the
   <a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
    <code class="literal">
     EXPLAIN
    </code>
   </a>
   plan. Your goals are to
      recognize the aspects of the
   <a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
    <code class="literal">
     EXPLAIN
    </code>
   </a>
   plan that indicate a query
      is optimized well, and to learn the SQL syntax and indexing
      techniques to improve the plan if you see some inefficient
      operations.
  </p>
 </div>
 <br/>
</div>
