We always say to these things that it depends, but in general to make a request that returns a large volume of data is better since the cost of each request in its various parts of transportation and processing is usually quite considerable. What is better to leave the living room and go in the kitchen to pick up one cookie at a time or bring the whole package?
But of course, if you bring a lot of stuff and you don’t need it, it doesn’t pay. There is a case that to decide what you will bring, you need to bring something earlier. It may be that in some cases the database system can do better with a smaller volume and optimize. And there are cases where you need to start showing some data to the user before receiving everything to give a better experience, even if the whole has a higher cost.Do you realize that there are cases that it is better to bring gradually? But this is more rare. Understand that there are a huge amount of things to observe to define what pays.
The worse the transport the easier it is to decide by a single request, in a remote network a request has a huge advantage.
That is why I always say that learning the cake recipe of what you should do is for nothing, what matters is to deeply understand the whole functioning of the technologies that are involved in what you do and make the decision according to need. Yeah, I know, everyone wants a magic rule that makes everything easy, but this doesn’t exist, and because many believe it exists, it’s because there’s so much bad software.
The question is ambiguous, well, transporting less data is always better, always! But you have to consider the whole operation not individual, it seems to me that you are talking about making a transaction with a volume of data or several others with little volume but adding up gives the same amount, so then it does not make sense for the additional cost, including volume of transport data because in each transport has a overhead.
Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful to you. You can also vote on any question or answer you find useful on the entire site.
– Maniero