列出更大量的数据,而无需太多服务器负载 [英] List larger amount of data without much server load

查看:54
本文介绍了列出更大量的数据,而无需太多服务器负载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在数据库中有大约1,00,000行,我必须列出所有记录,但服务器需要很长时间才能显示它。我正在考虑使用数据表来显示记录。在一个页面上需要20条记录。



我应该怎样做才能减少服务器负载?



我尝试了什么:



我没有开始开发工作,但我必须这样做,我需要建议。

I have approximately 1,00,000 rows in the database and I have to list all records but the server take long time to display it. i am thinking to use datatable to display records. on one page 20 records are required.

What should I do to decrease server load ?

What I have tried:

I've not start development work, but I'll have to do so, I need advise.

推荐答案

不要。对你来说很容易,对你的用户来说很慢,对你的用户来说完全没用。

想一想:你需要多长时间找到你感兴趣的那一行,当它在列表中的某个地方时10万行?几个小时?可能更多。

您认为用户将使用您的网站多少次?因为我的用户不会第一次使用它,而且我会收到一些非常滥用的电话或电子邮件。



Page。搜索一下。过滤它。但是从不向用户提供超过100个项目(优先级较低)。他们会去其他地方,也很快该死。
Don't. It's easy for you, slow as hell, and completely useless for your user.
Think about it: how long would it take you to find the one row you are interested in, when it's somewhere in a list of 100,000 rows? Couple of hours? Probably more.
How many times do you think the user is going to use your site? Because my users wouldn;t finish using it the first time, and I'd get some very abusive calls or emails.

Page it. Search it. Filter it. But never present the user with more than 100 items at a time (less by preference). They will go elsewhere, and damn quickly as well.


这篇关于列出更大量的数据,而无需太多服务器负载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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