<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="myisamchk-other-options">
      </a>
      6.6.4.4 Other myisamchk Options
     </h4>
    </div>
   </div>
  </div>
  <p>
   <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
    <span class="command">
     <strong>
      myisamchk
     </strong>
    </span>
   </a>
   supports the following options for
        actions other than table checks and repairs:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a name="option_myisamchk_analyze">
      </a>
      <a class="link" href="myisamchk-other-options.html#option_myisamchk_analyze">
       <code class="option">
        --analyze
       </code>
      </a>
      ,
      <code class="option">
       -a
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for analyze">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --analyze
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045306872784">
     </a>
     <a class="indexterm" name="idm46045306871296">
     </a>
     <p>
      Analyze the distribution of key values. This improves join
            performance by enabling the join optimizer to better choose
            the order in which to join the tables and which indexes it
            should use. To obtain information about the key
            distribution, use a
      <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
       <span class="command">
        <strong>
         myisamchk --description
            --verbose
         <em class="replaceable">
          <code>
           tbl_name
          </code>
         </em>
        </strong>
       </span>
      </a>
      command or the
      <code class="literal">
       SHOW INDEX FROM
       <em class="replaceable">
        <code>
         tbl_name
        </code>
       </em>
      </code>
      statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_block-search">
      </a>
      <a class="link" href="myisamchk-other-options.html#option_myisamchk_block-search">
       <code class="option">
        --block-search=
        <em class="replaceable">
         <code>
          offset
         </code>
        </em>
       </code>
      </a>
      ,
      <code class="option">
       -b
       <em class="replaceable">
        <code>
         offset
        </code>
       </em>
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for block-search">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --block-search=offset
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Numeric
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045306855760">
     </a>
     <a class="indexterm" name="idm46045306854272">
     </a>
     <p>
      Find the record that a block at the given offset belongs to.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_description">
      </a>
      <a class="link" href="myisamchk-other-options.html#option_myisamchk_description">
       <code class="option">
        --description
       </code>
      </a>
      ,
      <code class="option">
       -d
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for description">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --description
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045306844240">
     </a>
     <a class="indexterm" name="idm46045306842752">
     </a>
     <p>
      Print some descriptive information about the table.
            Specifying the
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_verbose">
       <code class="option">
        --verbose
       </code>
      </a>
      option once or twice produces additional information. See
      <a class="xref" href="myisamchk-table-info.html" title="6.6.4.5 Obtaining Table Information with myisamchk">
       Section 6.6.4.5, “Obtaining Table Information with myisamchk”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_set-auto-increment">
      </a>
      <a class="link" href="myisamchk-other-options.html#option_myisamchk_set-auto-increment">
       <code class="option">
        --set-auto-increment[=
        <em class="replaceable">
         <code>
          value
         </code>
        </em>
        ]
       </code>
      </a>
      ,
      <code class="option">
       -A[
       <em class="replaceable">
        <code>
         value
        </code>
       </em>
       ]
      </code>
     </p>
     <a class="indexterm" name="idm46045306835552">
     </a>
     <a class="indexterm" name="idm46045306834096">
     </a>
     <p>
      Force
      <code class="literal">
       AUTO_INCREMENT
      </code>
      numbering for new
            records to start at the given value (or higher, if there are
            existing records with
      <code class="literal">
       AUTO_INCREMENT
      </code>
      values this large). If
      <em class="replaceable">
       <code>
        value
       </code>
      </em>
      is
            not specified,
      <code class="literal">
       AUTO_INCREMENT
      </code>
      numbers for
            new records begin with the largest value currently in the
            table, plus one.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_sort-index">
      </a>
      <a class="link" href="myisamchk-other-options.html#option_myisamchk_sort-index">
       <code class="option">
        --sort-index
       </code>
      </a>
      ,
      <code class="option">
       -S
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for sort-index">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --sort-index
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045306821248">
     </a>
     <a class="indexterm" name="idm46045306819760">
     </a>
     <p>
      Sort the index tree blocks in high-low order. This optimizes
            seeks and makes table scans that use indexes faster.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_sort-records">
      </a>
      <a class="link" href="myisamchk-other-options.html#option_myisamchk_sort-records">
       <code class="option">
        --sort-records=
        <em class="replaceable">
         <code>
          N
         </code>
        </em>
       </code>
      </a>
      ,
      <code class="option">
       -R
       <em class="replaceable">
        <code>
         N
        </code>
       </em>
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for sort-records">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --sort-records=#
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Numeric
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045306806992">
     </a>
     <a class="indexterm" name="idm46045306805504">
     </a>
     <p>
      Sort records according to a particular index. This makes
            your data much more localized and may speed up range-based
      <a class="link" href="select.html" title="15.2.13 SELECT Statement">
       <code class="literal">
        SELECT
       </code>
      </a>
      and
      <code class="literal">
       ORDER
            BY
      </code>
      operations that use this index. (The first time
            you use this option to sort a table, it may be very slow.)
            To determine a table's index numbers, use
      <a class="link" href="show-index.html" title="15.7.7.23 SHOW INDEX Statement">
       <code class="literal">
        SHOW INDEX
       </code>
      </a>
      , which displays a
            table's indexes in the same order that
      <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
       <span class="command">
        <strong>
         myisamchk
        </strong>
       </span>
      </a>
      sees them. Indexes are numbered
            beginning with 1.
     </p>
     <p>
      If keys are not packed (
      <code class="literal">
       PACK_KEYS=0
      </code>
      ),
            they have the same length, so when
      <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
       <span class="command">
        <strong>
         myisamchk
        </strong>
       </span>
      </a>
      sorts and moves records, it
            just overwrites record offsets in the index. If keys are
            packed (
      <code class="literal">
       PACK_KEYS=1
      </code>
      ),
      <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
       <span class="command">
        <strong>
         myisamchk
        </strong>
       </span>
      </a>
      must unpack key blocks first,
            then re-create indexes and pack the key blocks again. (In
            this case, re-creating indexes is faster than updating
            offsets for each index.)
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
