开发者

What should be the best design approch

We have a simple table with employee data containing a 100k records. We want to display them using pagination on a simple JSP page with helper class/bean.

On one page we'll开发者_开发知识库 display 50 records.

Shall I fetch 50 records as per the page number & display them/ Use some other alternative?

What should be the best design approach to this problem?


You might want to do the paging with database & using cache for reduce the data accessing to database.refer: http://onjava.com/pub/a/onjava/excerpt/jebp_3/index2.html "Cache on the server"


There are many paginators for java server page. You can use one of them and display some records on the pages. For paging you can use for example - jsptags paginator


100k records thats mean 50 X 2000 or could i say it need 2000page to see all record. if u use pagination and dispaly pagination completly using first, previous, next, last and number each page it will be harmfull. cause @1st u must count all record, it spend more time in your query to load @2nd u must make a algorith to display it on your view.my advice is using pattern that was facebook and twiit use..on pagination only use next and previous.it will be simple and reduce page load time.

thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜