大分页问题
我的结果页面需要分页。但我有一些问题。
我从 Web 服务(不是我的)获得结果,大约有 1 000 000 个对象。但是在1 000 000个对象中,有一些对象的状态是DELETED(当我调用Web服务时我无法过滤它,我只能在获取它们时过滤它)。例如,200 000 个对象的状态为 DELETED,所以我拥有的总正确项目数为 800 000。
问题:我必须将它们全部删除,并进行一些过滤以获得总项目数为 800 000。所以它很慢。
你有比我更完美的解决方案吗?谢谢
My result page needs to be paged. But I have some problems.
I get results from a web service (not mine), about 1 000 000 objects. But in 1 000 000 objects, there are some objects with their status is DELETED (I can't filter it when I call web service, I just can filter it when I get them down). For example, 200 000 objects have their status is DELETED, so total right items I have is 800 000.
Problem: I must get all of them down, and do something to filter to get the number of total items is 800 000. So It is slow.
Do you have a perfect solutions than me. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,如果您循环遍历对象,您始终可以忽略
(obj.status=="DELETED")
的项目Well, if you're looping through the objects, you can always just ignore the items where
(obj.status=="DELETED")