Hai Dear Friends, I did my pagination with the help of pager tag lib. It's working well. But I noticed that it fetch all the data's from table for each iteration.( Iteration means when I select Next or Previous link)But it display the data's based on the offset. I hope It's not good method. If I have a database containing 1000 items and for each iteration , If it takes all the data's .....the syutem will go wrong.....so I hope there will be an alternative method or a solution to solve it.....so if any one experience such like problems and solve it.....kindly help me...... Regards,ashl
There are more advanced things you can do with the pager tablib, but with a basic implementation your action will load all the records from the database and the taglib will "throw away" all the records except the ones needed for the current page. This seems very wasteful, but I have found this to be acceptable in most cases. One simple optimization is to store the results on the session so you don't have to query the database each time. This solution does not work well for very large datasets or sites with lots of users.