Vaibhav Gargs wrote:Suppose the database returns the 10,000 records as query result. Should we store them in Java at the backend to save db queries.
That depends on what you intend to do with them. For example, if this is for a web app, then there may not be a need to retrieve 10000 records since you would display no more than, say, 100 or so at a time. But if further processing needs to be done on them that the DB can't do, you may have to.
if we have 10000 users who are hitting this service and then won't it overkill the system.
If you actually have 10K
simultaneous users you may have to put in place a pool of servers. Is this a theoretical question, or an actual concern?