First page Back Continue Last page Graphics


Notes:

Business Components: VO Tuning (continued)

Max Fetch Size: The default maximum fetch size for a VO is -1, which means that there is no limit to the number of rows the VO can fetch. In cases where the result set should only contain N rows of data, you should select the “Only up to row number” option and set it to N. The developer can alternatively call setMaxFetchSize(N)to set this programmatically or manually add the MaxFetchSize parameter to the VO XML. For View Objects whose WHERE clause expects to retrieve a single row, set the At Most One Row option. This way the view object knows that you do not expect any more rows and will skip its normal test for the situation. As mentioned earlier, setting a maximum fetch size of 0 makes the view object insert-only. In this case, no select query is issued, so no rows are fetched.

Forward-Only Mode: If a dataset is to be traversed only going forward, the forward-only mode can help performance when iterating through the dataset. You can configure this by programmatically calling setForwardOnly(true) on the VO. Setting forward-only also prevents caching previous sets of rows as the dataset is traversed.