title: Slow DB Migration in Entity Framework code first migrations
body: <p>Using the standard way to upgrade my db takes 7 seconds which is way too slow as my database has 3 tables with 5 fields each and practically no data.</p>
  
  <pre><code>var configuration = new Configuration();
  var migrator = new DbMigrator(configuration);
  //Update database to latest migration
  migrator.Update();
  </code></pre>
  
  <p>Using Entity Framework 6.0.</p>
  
  <p>This code runs everytime I start my app and it's killing my performance. Why is so slow? Anyway to speed it up?</p>
  
  <p>Here's my app.config:</p>
  
  <pre><code>&lt;system.data&gt;
  &lt;DbProviderFactories&gt;
  &lt;remove invariant="System.Data.SqlServerCe.4.0" /&gt;
    &lt;add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /&gt;
  &lt;/DbProviderFactories&gt;
  &lt;/system.data&gt;
  &lt;entityFramework&gt;
  &lt;providers&gt;
    &lt;provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" /&gt;
  &lt;/providers&gt;
  &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework"&gt;
    &lt;parameters&gt;
      &lt;parameter value="System.Data.SqlServerCe.4.0" /&gt;
    &lt;/parameters&gt;
  &lt;/defaultConnectionFactory&gt;
  &lt;/entityFramework&gt;
  </code></pre>