I am trying to do the best for the server and I want to find out what is the favoured approach for scrolling though several pages of results returned from a query.
Should I perform the query and create an alias table and count the number and then when they want page 2 LIMIT is 20, 40 on the alias table?
Do you hold all the results on one long monster array and page through them?
There seem like a lot of option and I would appreciate some advice
Cheers
Because I wanted to do as little realtime parsing as possible this was the solution I came up with.
For me the key issues were:
1. Dynamically restrict page size.
2. Don't break the page in a word or sentence, look for paragraphs.
3. Must handle HTML code in the page, so don't break the html tags either.
The solution was to pre-process the page during the upload, into 200 word blocks, where I escaped each block, and just look for the escape characters when retrieving.
There is a little bit of logic processing to contend with in regards to not breaking html tags etc, but again this can all be pre-processed.
asp.