I have to fetch more than 2,00,000 records at once and use the paging of 100 or 1000 records per page without interacting to database again and again .
我必须一次获取超过2,00,000条记录,并且每页使用100或1000条记录的分页,而不会一次又一次地与数据库交互。
Like we can have a virtual cache or hidden record-set from where my paging will show records.I heard that it is possible but did not find the proper solution.
就像我们可以有一个虚拟缓存或隐藏的记录集,我的分页将显示记录。我听说它是可能的,但没有找到合适的解决方案。
Please suggest me the if anyone have solution for my requirement , i am using PHP and mysql.
请建议我,如果有人有我的要求的解决方案,我使用PHP和MySQL。
Thanks,
1 个解决方案
#1
0
You have 2 choices here: Make one DB transaction and overload the clients DOM or do multiple DB calls.
这里有2个选择:创建一个数据库事务并重载客户端DOM或执行多个数据库调用。
My suggestion is to take the middle path, select in 10 000 's, display data and then when they wish to paginate from beyond that you ajax more results in.
我的建议是采取中间路径,选择10 000,显示数据,然后当他们希望从远处分页时,你可以获得更多的结果。
#1
0
You have 2 choices here: Make one DB transaction and overload the clients DOM or do multiple DB calls.
这里有2个选择:创建一个数据库事务并重载客户端DOM或执行多个数据库调用。
My suggestion is to take the middle path, select in 10 000 's, display data and then when they wish to paginate from beyond that you ajax more results in.
我的建议是采取中间路径,选择10 000,显示数据,然后当他们希望从远处分页时,你可以获得更多的结果。