Although often the problem is producing many rows in the first place, it is made worse by returning all the unnecessary rows to the client. This is especially true if the client and server are not on the same host.
Here are some ways to reduce the traffic between the client and server.