如何使用symfony和doctrine处理巨大的选择查询? [英] How to handle huge select query with symfony and doctrine?
问题描述
我在考虑在滚动播放列表时加载列表的解决方案,但这使我另一个问题,如果我没有加载所有视频,我无法正确保存播放列表。
欢迎所有的建议/建议...
使用动态分页,即
不要把每件事情都带到前端,第一次大约100个,渲染前10个当用户到达第80个项目时异步调用下一个100。
使用这个响应时间不会阻碍DB命中。
希望这将有助于
For example, i have playlist of 5000-10000 videos, what is the best way to select and show those videos in list. Pager is not an option, I need to have all of them becouse sorting and other functionalities?
I thinking about solution to load list while scrolling the playlist, but this make me another problem, if i dont have all videos loaded, i can not properly save playlist.
All suggestions/proposals are welcome...
use a dynamic pagination i.e, dont bring every thing to the frontend, bring a bulk around 100 in the first time and render the first 10 and when the user reaches to 80 th item call the next 100 asynchronously. Using this the response time wont be hampered neither the DB hit. Hope this will help
这篇关于如何使用symfony和doctrine处理巨大的选择查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!