Understand parameter prompts, Understand page mode – HP Neoview Release 2.5 Software User Manual

Page 214

Advertising
background image

page mode

Understand Parameter Prompts

SQL statements can be parameterized by embedding parameter names surrounded by $$ (double
dollar signs). When the statement is executed, the SQL Whiteboard prompts you for values for
all parameters in that statement and easily allows you to reuse recent values for those parameters.

Understand Page Mode

When you execute a statement in the SQL Whiteboard, HPDM caches the results in virtual
memory for display purposes. But the SQL Whiteboard can run out of memory if:

A single query has a large result set (a result set consisting of a large number of columns or
a large number of rows, or both).

Several queries with large result sets are executed in a single SQL Whiteboard session.

To prevent out-of-memory conditions and accommodate large result sets, the SQL Whiteboard
can run in “page mode.” In page mode, the SQL Whiteboard breaks large result sets into pages
and fetches one page at a time, rather than trying to fetch everything and display all rows in the
grid. Page mode reduces the amount of memory used because only a partial result is held in
memory and displayed in the Statement Details pane.

Default Page Mode Operation

By default, the SQL Whiteboard tries to display all the results of a statement. However, it
automatically runs in page mode when:

Insufficient memory is available to display the result set in one page. In this case, the SQL
Whiteboard automatically displays the result in page mode.

You specify a value from 1 to ≤100,000 in the Rows/Page field of the Statement Pane. In this
case, the SQL Whiteboard automatically uses page mode and allocates the number of rows
per page that you specified (memory permitting).

Page Mode Considerations

Note these considerations for page mode:

During the course of statement execution, HPDM frequently computes the available virtual
memory of the application. If the available virtual memory falls below an internal threshold,
statement execution goes into page mode. The user has no control over this. In some cases,
page mode must be used to prevent HPDM from running out of memory and generating
an exception.

When a statement is executed and the number of rows is less than the Rows/Page threshold,
all rows in the results are fetched and displayed in the grid.

When a statement is executed and the number of rows in the result set exceeds the
Rows/Page

threshold, the statement execution goes into page mode, in which partial results

are fetched and displayed.

When statement execution enters page mode, the Statement Details pane displays a [ Next
Page ]
button:
— Until you click [ Next Page ], the execution is paused, and the SQL cursor remains open.

However, the Time Elapsed timer keeps running because it tracks the wall time.

— When you click [ Next Page ], the next page of results is fetched from the server. The

first page is deleted from the grid when the new page is loaded. The process repeats
until you either view all the pages or cancel the query.

— You cannot go back to the previous page because the ODBC cursor operates in

FORWARD mode only. To display earlier results, you must re-execute the statement.

214

Use the SQL Whiteboard

Advertising