Tuesday, May 8, 2012

Pagination Solution

In the last couple of days, I had some discussions with some developers regarding how to implement Pagination, below are the notes. 1. Client side solution, good for small result (10-500), static data. Initial load is slow, but switch is fast. 2. Application server solution, good for medium result set (500- 1000), and relative static data. Initial load is slow. and switch is little slow. 3. Database solution, good for Large result set ( > 10000) and dynamic data. Initial load is faster than the other two, but switch pages are much slower depends on QUERY. If the query is complicated and expensive, then solution 3 will have big overhead. By the way, from scalability point of view, database solution is much more expensive as it will need query db multiple times and resources are also expensive (hard to scale).