Retrieving rows as needed

If a DataWindow object retrieves hundreds of rows, there can be a noticeable delay at runtime while all the rows are retrieved and before control returns to the user. For these DataWindow objects, Sybase WorkSpace can retrieve only as many rows as it has to before displaying data and returning control to the user.

For example, if a DataWindow object displays only 10 rows at a time, Sybase WorkSpace only needs to retrieve 10 or more rows before presenting the data. Then, as the user pages through the data, Sybase WorkSpace continues to retrieve what is necessary to display the new information. There may be slight pauses while Sybase WorkSpace retrieves the additional rows, but these pauses are usually preferable to waiting a long time to start working with data.

StepsTo specify that a DataWindow object retrieve only as many rows as it needs to:

  1. Select Rows>Retrieve Options>Rows As Needed from the menu bar.

    With this setting, Sybase WorkSpace presents data and returns control to the user when it has retrieved enough rows to display in the DataWindow object.

Retrieve Rows As Needed is overridden if you have specified sorting or have used aggregate functions, such as Avg and Sum, in the DataWindow object. This is because Sybase WorkSpace must retrieve every row before it can sort or perform aggregates.

In a multiuser situation, Retrieve Rows As Needed might lock other people out of the tables.