When there is more data in a query's result set than
can be displayed to the user, normally we display the
first N rows and give an option to get more. What is
the best way to handle this <get next N items> functionality?
I see three ways of doing it:
1. When the user asks for the <next N> , do the full
query again and pick the appropriate N items
2. Store all the results in Session variables (i.e. in Memory)
3. Store the results in temporary tables. (to avoid a full query,
but still accessing the database)
What do people do generally?