I have an SQLite3 Database file, MyDatabase.sqlite 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 Datagrid.
DataTable dt = new DataTable();
using (SQLiteCommand cmd = new SQLiteCommand("Select * from Orders", conn))
{
using (IDataReader rdr = cmd.ExecuteReader())
{
dt.Load(rdr);
}
}
It takes around 54 seconds to execute. SQLiteAdapter.Fill(dataset) also takes the same amount of time. Is there a faster way to fetch data from SQLite DB ?
Aucun commentaire:
Enregistrer un commentaire