如何有效地从数据库中获取大量记录? [英] How to fetch huge records from database efficiently ?

查看:51
本文介绍了如何有效地从数据库中获取大量记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我们需要从数据库中获取1000条记录,那么用户不需要等待一定的时间或不使系统挂起就应遵循的流程是什么?

If we need to fetch 1000 records from database , what is the processs to be followed that the user need not wait for lomg time or not to get the system hang

推荐答案

如果您的应用程序是基于多用户的应用程序,那么我希望您使用该应用程序的用户实体框架.

您可以使用数据集!
I prefer you to user entity framework for such an application if it is multiuser based application.
Or
You can go for data set!


从数据库中获取记录时使用分页.

使用LINQ to SQL的分页 [
Use pagination while fetching records from database.

Pagination using LINQ to SQL[^]


这篇关于如何有效地从数据库中获取大量记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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