I am developing a web 2.0 website, with a search page that contains a cachable table which can retain the searched data.
How can my page manage if the results return a lot of data?
There are 2 solutions:
- 1st solution: Using pagination, the search result will list all pages & when the user clicks on a page then all results of that page will be stored in the table, like this:
TextBox:__________ [Search Button] All result pages: [1] [2] [3]...(suppose users click on page 1 & then page 3, then-->) The following table contains page: 1, 3 ItemID - Item name.... 12 - xxx--->data from page 3 13 - vvv--->data from page 3 11 - ooo--->data from page 1 10 - kkk--->data from page 1
- 2nd solution: just use a
Nextbutton, and when the user clicks search it will load the most relevant data first. If there additional data, then aNextButton will appear, and clicking theNextbutton will load more data,
TextBox:__________ [Search Button] [Next Result] ItemID - Item name.... 12 - xxx--->data from page 2 13 - vvv--->data from page 2 11 - ooo--->data from page 1 10 - kkk--->data from page 1
With the 1st approach, the server is a bit slower (maybe a few millisec) because it has to spend time counting the total rows. It might be harder to code, but the user can see an overview of how many results.
With the 2nd approach, the server is a bit faster (maybe a few millisec) because it doesn't have to spend time counting the total rows. But the users can't see the overview of how many results. Probably easier to code.
In both solutions, the users can sort and filter the accumulated data.
If the table can accumulate the data, then will pagination be necessary? Which solution is better?