Consultor Eletrônico



Kbase 17865: Apptivity - Datasource parameters that affect cache behavior
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
Apptivity - Datasource parameters that affect cache behavior

This kbase discusses the following data source properties
which affect caching of data:

max rows
read-ahead
want row count on requery

and the following method call:

abRecordSet.setFetchInc()

The setting "max rows" indicates the number of rows which the
server will retrieve from the database. If max rows is 100 but
there are 1000 records in the database that satisfy the query
criteria, only 100 rows will be retrieved. If you want to be
sure that all 1000 records will be retrieved, set max rows to
0 (or 1000; 0 is safer since all rows will be retrieved and
you do not need to know the exact number of rows which satisfy
the criteria).

The "read-ahead" setting controls a server background
process that reads ahead in the result set and caches
records even if the client has not requested them yet. The
background process sleeps for 1/4 of a second between each
read ahead operation. During each read ahead operation, the
background process will retrieve x number of records from
the results set, where x is the number to which you set
"read-ahead". If read-ahead is 0, records will be cached from
the result set to the server cache only when a client requests
more records from the server.

It is helpful to set "want row count on requery" if your
application must avoid a -1 return value from
abRecordSet.rowCount(). Remember, rowCount() will return
-1 until all the records have been read. If you turn
"want row count" on, the server will insure that the total row
count will be determined the first time a record is retrieved
by the client. Note that this option should only be used when
needed, since the operation to guarantee that row count is known
will take time to execute.

The method setFetchInc() allows you to set a "fetch increment".
The "fetch increment" indicates how many rows will be passed to
the client on each fetch of any row on the server.

UTF
4/22/98
Apptivity 2.0

Progress Software Technical Support Note # 17865