I am trying to think about design principle to be followed in such scenarios. Suppose we hit the DB and fetched the data corresponding to the user, and it returns 10000 rows per user and we have say 1000/10000 users making such requests (all users will have different result sets). Yes, in web-app, we will never show all 10000 results to the user instead it will be utilizing pagination features. So, should we go to the DB again to fetch next page of data or what will be good design principle? If we go to the DB again, won't it perform the sorting operation (10000 total records / 100 results per page = 100 pages) considering every fetch will get 100 records per fetch. What would be the ideal implementation strategy?