Retaining and Reusing a RowSet
Each time you retrieve a view link accessor row set, by default the view object creates a new RowSet object to enable you to work with the rows. This does not imply re-executing the query to produce the results each time, but only creating a new instance of a RowSet object with its default iterator reset to just before the first row.
Because there is a small amount of overhead associated with creating the row set, if your code makes numerous calls to the same view link accessor attributes you can consider enabling view link accessor row set retention for the source view object in the view link. For example, because view accessor row sets remain stable as long as the master row view accessor attribute remains unchanged, it would not be necessary to re-create a new row set for UI components, such as the tree control, where data for each master node in a tree needs to retain its distinct set of detail rows.
You can declaratively enable retention of the view link accessor row set by using the overview editor for the view object that is the source for the view link accessor. Select Retain View Link Accessor Row Set in the Tuning section of the General page of the overview editor for the view object.
The lesson titled “Programmatically Customizing Data Services” describes how to implement this functionality programmatically.