Linq 到 Postgresql
我有一个用 C# 编写的程序,它使用 Linq to NHibernate 来访问数据。数据库后端是Postgres。
在我的应用程序中,我有一个名为 contractors
的表,其中包含 10,000 条记录。将此表中的所有记录显示到 DataGridView 中有时需要几分钟的时间。
有什么方法可以加快显示这些数据的速度吗?可能导致这种放缓的主要问题是什么?
I have a program written in C#, which uses Linq to NHibernate to access the data. The database backend is Postgres.
In my application, I have a table called contractors
, which has 10,000 records. Displaying all of the records in this table into a DataGridView sometimes take several minutes.
Are there any ways that I can speed up displaying this data? What are the major problems that could possibly cause such a slowdown?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须将服务器端分页与 datagridview 结合使用。
Datagridview 很慢,并且您不会向用户显示 10k 行。
You have to use server side paging with datagridview.
Datagridview is slow, and you will not display 10k rows to a user.