简体   繁体   中英

How to handle huge select query with symfony and doctrine?

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 ie, 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM