Linq 到 Postgresql

发布于 2024-12-16 22:41:28 字数 219 浏览 11 评论 0原文

我有一个用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

南汐寒笙箫 2024-12-23 22:41:28

您必须将服务器端分页与 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文