Linq到Postgresql [英] Linq to Postgresql

查看:465
本文介绍了Linq到Postgresql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用C#编写的程序,它使用Linq来NHibernate访问数据。数据库后端是Postgres。



在我的应用程序中,我有一个名为承包商的表,它有10,000条记录。将此表格中的所有记录显示到DataGridView中有时需要几分钟。



有没有办法加快显示这些数据?可能导致这种减缓的主要问题是什么?

解决方案

您必须使用datagridview进行服务器端分页。
Datagridview缓慢,您不会向用户显示10k行。


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?

解决方案

You have to use server side paging with datagridview. Datagridview is slow, and you will not display 10k rows to a user.

这篇关于Linq到Postgresql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆