Speed up insert mdb

前端 未结 5 1320
抹茶落季
抹茶落季 2020-12-19 18:06

Is there a way to speed up inserts to a mdb?

 using (StreamReader sr = new StreamReader(_localDir + \"\\\\\" + _filename))
  while ((line = sr.ReadLine()) !=         


        
5条回答
  •  离开以前
    2020-12-19 18:49

    Another change that might speed it up a little more is to prepare the command one time and create all the parameters. Then in the loop, just assign the parameter values and execute it each time. That may avoid the parsing and semantic checking of the statement each iteration and should improve the time some. However, I don't think it would be a significant improvement. The statement parsing should be a relatively small portion of the total cost even if it is parsed every time.

提交回复
热议问题