<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="innodb-benchmarking">
      </a>
      17.1.4 Testing and Benchmarking with InnoDB
     </h3>
    </div>
   </div>
  </div>
  <p>
   If
   <code class="literal">
    InnoDB
   </code>
   is not the default storage engine,
      you can determine if your database server and applications work
      correctly with
   <code class="literal">
    InnoDB
   </code>
   by restarting the server
      with
   <a class="link" href="server-system-variables.html#sysvar_default_storage_engine">
    <code class="literal">
     --default-storage-engine=InnoDB
    </code>
   </a>
   defined on the command line or with
   <a class="link" href="server-system-variables.html#sysvar_default_storage_engine">
    <code class="literal">
     default-storage-engine=innodb
    </code>
   </a>
   defined in the
   <code class="literal">
    [mysqld]
   </code>
   section of the MySQL
      server option file.
  </p>
  <p>
   Since changing the default storage engine only affects newly
      created tables, run your application installation and setup steps
      to confirm that everything installs properly, then exercise the
      application features to make sure the data loading, editing, and
      querying features work. If a table relies on a feature that is
      specific to another storage engine, you receive an error. In this
      case, add the
   <code class="literal">
    ENGINE=
    <em class="replaceable">
     <code>
      other_engine_name
     </code>
    </em>
   </code>
   clause to the
   <a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
    <code class="literal">
     CREATE TABLE
    </code>
   </a>
   statement to avoid the error.
  </p>
  <p>
   If you did not make a deliberate decision about the storage
      engine, and you want to preview how certain tables work when
      created using
   <code class="literal">
    InnoDB
   </code>
   , issue the command
   <a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
    <code class="literal">
     ALTER TABLE
      table_name ENGINE=InnoDB;
    </code>
   </a>
   for each table. Alternatively,
      to run test queries and other statements without disturbing the
      original table, make a copy:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa17244465"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token keyword">ENGINE</span><span class="token operator">=</span>InnoDB <span class="token keyword">AS</span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> <em class="replaceable">other_engine_table</em><span class="token punctuation">;</span></code></pre>
  </div>
  <p>
   To assess performance with a full application under a realistic
      workload, install the latest MySQL server and run benchmarks.
  </p>
  <p>
   Test the full application lifecycle, from installation, through
      heavy usage, and server restart. Kill the server process while the
      database is busy to simulate a power failure, and verify that the
      data is recovered successfully when you restart the server.
  </p>
  <p>
   Test any replication configurations, especially if you use
      different MySQL versions and options on the source server and
      replicas.
  </p>
 </div>
 <br/>
</div>
