Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

How to process large SQL resultsets

Updated on September 13, 2021


A developer asks:

How can our application process huge SQL resultsets?

Is there a way to implement 'cursor-style' processing (iterating through a result set and processing one row at a time) without returning the results to a Page List?


Suggested Approach

The recommended approach is to get only a list of keys to the records in the resultset, and then iterate over the keys, opening one record at a time. After the first record is processed, the clipboard pages it occupied can be deleted (or reused for the second record).

In the absence of a key, or a natural combination of values that constitute the equivalent of a primary key, you can use cursor-style processing by writing Java steps. You can use Java steps to declare the cursor, return one row using the cursor, and then using the Java step or a wrapper activity to call the activity on that one row - and then repeat the process. You will need to manage the database connection directly to hold onto it.

In some situations, case match rules may be applicable. Review Rule-Declare-CaseMatch documentation to see whether this rule type is applicable to your problem.

  • Previous topic How to detect and remedy the performance impact of Obj-List methods and list view reports
  • Next topic Implementing serialized objects on distributed systems

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us