Is there a way to speed up inserts in mdb?
using (StreamReader sr = new StreamReader(_localDir + "\\" + _filename))
while ((line = sr.ReadLine()) != null)
{
}
It takes about 20 seconds for ~ 2 mm records from csv but when I add mdb to the insert, I can barely get 10,000 records in 10 minutes, so you can see that it takes forever
using (StreamReader sr = new StreamReader(_localDir + "\\" + _filename))
while ((line = sr.ReadLine()) != null)
{
using (OleDbConnection con = new OleDbConnection(_conStr))
using (OleDbCommand cmd = new OleDbCommand())
cmd.Parameters.AddWithValue...
cmd.ExecuteNonQuery();
}
Is there a better way? Connection pool? multithreading? Here is my constr Provider = Microsoft.Jet.OLEDB.4.0; Data Source = mypath; Jet OLEDB: Engine Type = 5 "
Hi
_Eric
source
share