如何在不使用数据库切片的情况下在视图中显示大列表?
我有一项服务,可以通过多个表的多次迭代和计算生成大型地图。我的问题是我无法使用分页偏移量来切片数据,因为数据来自多个表并且数据上发生了不同的修改。将其显示在屏幕上;我必须将包含 10-20,000 条记录的地图发送到视图,这对于这个大型数据集来说是有问题的。 此时我有页面分页,但这非常慢且效率低下。 我想到的一件事是将其转储到表中并每次查询它,但随后我必须处理并发用户。
我的问题是,当我无法使用数据库切片(偏移量、最大值)时,显示此列表的最佳方法是什么?
我正在使用 grails 1.0.3 数据表和 jquery
I have a service that generates a large map through multiple iterations and calculations from multiple tables. My problem is I cannot use pagination offset to slice the data because the data is coming from multiple tables and different modifications happen on the data. To display this on the screen; I have to send the map with 10-20,000 records to the view and that is problematic with this large dataset.
At this time I have on-page pagination but this is very slow and inefficient.
One thing I thought is to dump it on a table and query it each time but then I have to deal with concurrent users.
My question is what is the best approach to display this list when I cannot use database slicing (offset, max)?
I am using
grails 1.0.3
datatables and jquery
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许 SlickGrid! 是您的一个选择。其中一个 示例 可处理 50000 行,而且速度似乎很快。
基督教
Maybe SlickGrid! is an option for you. One of there examples works with 50000 rows and it seems to be fast.
Christian
我最终将地图的结果写入表中,并使用该表上的数据切片进行分页。保存数据需要一些时间,但至少我不必担心大数据的性能。我使用时间戳来区分请求。每个请求都将以其时间戳进行保存和检索。
I end up writing the result of the map in a table and use the data slicing on that table for pagination. It takes some time to save the data but at least I don't have to worry about the performance with the large data. I use time-stamp to differentiate between requests. each requests will be saved and retrieved with its time stamp.