DataAdapter.Fill too slow

谁说胖子不能爱 提交于 2019-12-03 16:28:38

You could bind the DataGridView to a DataReader instead, but it may not be much better, since loading 3000 rows into a DataGridView just isn't speedy .

the core problem is loading 3000 for the user at once. no matter how to load 300 records the amount of data is the problem. implement paging within the sql query to allow the user to view a subset of records. the user can then navigate to more records when they need to.

Use BatchUpdate/BatchInsert. Make sure you specify UpdateBatchSize = 3000 (number of records you have)

Here is an example on how to do it: BatchInsert

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!