title: What is the fastest way to retrieve a million records from an SQLite database file and display it in the WPF Datagrid?
body: <p>I have an SQLite3 Database file, <code>MyDatabase.sqlite</code> having a million rows and 50 columns (File size ~200MB). I want to load the data from this file and display it on a WPF <code>Datagrid</code>.</p>
  
  <pre><code>DataTable dt = new DataTable();
  using (SQLiteCommand cmd = new SQLiteCommand("Select * from Orders", conn))
  {
      using (IDataReader rdr = cmd.ExecuteReader())
      {
          dt.Load(rdr);
      }
  }
  </code></pre>
  
  <p>It takes around 54 seconds to execute. <code>SQLiteAdapter.Fill(dataset)</code> also takes the same amount of time. Is there a faster way to fetch data from SQLite DB ?</p>