There are a number of reasons for having pagination, reducing server load is just one. However, Stephen OrrStephen Orr raises a valid point - you still need to find the amount of data first. You have to make sure that that query is quick and doesn't unduly load your server.
Other reasons include:
- Reducing the amount of data returned to the client in one go. If you have a lot of data this could take some considerable amount of time and take up a lot of memory.
- The user often isn't interested in all the data, but only the most recent (say). By returning only a couple of pages of data you aren't getting data the user is never going to see.
In both of these cases you don't want to make the user wait - either for data they aren't going to view, or for all the data when they could be getting one with processing some of it.