Author: Marso
Posted: Wed Mar 08, 2017 8:17 pm (GMT 5.5)
Fetching and storing up to 10000 rows may lead to bad response times, which is... not good.
Some sites may even limit the number of DB2 accesses by a task.
With 10 rows a pages, you can have up to 1000 pages. That's a lot of Temporary Storage.
As I doubt that anybody will ever reach page 100 by pressing 99 times on PF8, that's a lot of wasted storage.
What would I do ?
1. Find in the table a "continuation key", one that would allow to "restart" a cursor at a different place.
2. Fetch 10 rows, save them in a TS Item and display them on screen.
3. If the user presses PF8, open the cursor using the "continuation key" to reposition it after the last row of previous page. Return to step 2.
4. If the user presses PF7, just reload data from previous item in TS and display.
Posted: Wed Mar 08, 2017 8:17 pm (GMT 5.5)
Fetching and storing up to 10000 rows may lead to bad response times, which is... not good.
Some sites may even limit the number of DB2 accesses by a task.
With 10 rows a pages, you can have up to 1000 pages. That's a lot of Temporary Storage.
As I doubt that anybody will ever reach page 100 by pressing 99 times on PF8, that's a lot of wasted storage.
What would I do ?
1. Find in the table a "continuation key", one that would allow to "restart" a cursor at a different place.
2. Fetch 10 rows, save them in a TS Item and display them on screen.
3. If the user presses PF8, open the cursor using the "continuation key" to reposition it after the last row of previous page. Return to step 2.
4. If the user presses PF7, just reload data from previous item in TS and display.