关于最佳方法 [英] Regarding Best Approach

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

问题描述

我的数据库中有20个Laks的数据,我需要读取数据并使用网格等显示在ui中。



如果我显示全部一旦在UI中数据就会产生性能问题。



请告诉我从数据库中读取数据的最佳方法是什么,如何编写查询那,我在哪里可以存储代码背后的数据,如何使用网格显示数据,它不会产生性能问题。



谢谢和问候
Basheer Ahamed

I have 20 Laks of data in my database and i need to read though data and display in to ui using grid etc..

If i display all the data once in a UI it will create the performance issue.

Please tel me what is the best approach to read the data from data base, how to write the query for that, where can i store through data in code behind, how can i display through data using grid and it wont make the performance issue.

Thanks and Regards
Basheer Ahamed

推荐答案

请参阅此CP文章: 如何在ASP.NET中的GridView控件中实现分页 [ ^ ]。



/ ravi
See this CP article: How To Implement Paging in GridView Control in ASP.NET[^].

/ravi


Hello Basheer,



这是我们放弃应用程序性能的重要一点,



所以在你的数据库中创建一个storedprocedure ,



将根据分页返回您的数据



如果您可以轻松显示200记录在你的屏幕然后

你可以将pagesize = 200作为参数传递给你的程序



之后从Db获取数据的页数是多少生成

以及要在UI中显示的页码
Hello Basheer ,

This is the important point where we loose our application performance ,

so create a storedprocedure in your DB ,

that will return you data according to paging

if you can easily show "200" records in your screen then
you can pass pagesize=200 as a parameter to your procedure

after that fetch data from Db how much page is generated
and which page number you want to display in UI


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

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