I need to give away results of the query in response to a following URL:
http://foo.com/search?from=20&perpage=10
What is the best practice from performance point of view?
Run the query every time with WHERE row > N and row <= K
Run query once and keep all the result for certain amount of time
What else could be done?