Grid applicacation with multiple pages. How to cache the sql query ?

Hello,

I am looking for a way to improve the speed of grid pagination.

In all grid applications displaying more than one page, the sql query is re-executed by the database for each page displayed.

Each time I move from one page to the next one, the database execute again the same query.

This is extremely time consuming, especially for long query.

Is there the possibility to execute the query only once, cache the result set in memory and then display page by page without going each time back to the database ?

Afaik not within the SC grid applications. Caching can be done in different ways: on the client (which needs an initially long wait on large result sets) or on the server, but then it takes a lot of memory on sites with lots of visitors. But what might help is to create a tempory table with the search result and build your query on that.