Kbase 16227: AS/400 Field List Performance V8.1 Client
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/15/2008 |
|
Status: Verified
GOAL:
Field list support for AS/400 DataServer.
GOAL:
Progress 8.1 Client with 8.0C or higher DataServer.
FACT(s) (Environment):
Progress 8.1x
Progress/400 DataServer
FIX:
There are some differences between the way Standard Progress handles Field list and the AS/400 DataServer.
Field lists do work with NO-LOCK. This is different from Standard Progress, in which field list also work with SHARE-LOCK and is documented as such in the Language Reference manual.
PROCEDURAL APPROACH:
====================
Field lists allow you to select a "short" list of fields to retrieve in a query. Only the fields listed in the FIELDS clause of DEFINE QUERY will be retrieved, thus shortening the data length of the record.
Field list are only enabled in a NO-LOCK query. If the query specifies SHARE-LOCK (the default) or EXCLUSIVE-LOCK, field lists are quietly turned off (i.e. entire record is retrieved).
Specifying a Field list in conjunction with a NO-LOCK query enables "record prefetch". This mechanism allows the PROGRESS/400 DataServer to "pack" the shorten "field-list records" together up to the size of the network message (-Mm parameter).
-Mm parameter, the larger the better. The larger this is, the more records that can be packed together in a single network packet. This applies to both field-list records and whole records.
Record length. Field list improvements are most dramatically seen where the record length of a file is close to, or greater then the -Mm parameter.
Example: "FILEA" has a record length of 4200 bytes and the -Mm of 4000. Since the record length is larger than the -Mm parameter, each whole record will require 2 network packets. The first packet will contain the first 4000 bytes of the record, the second will contain the remaining 200 bytes. The record is reassembled in the client, or if the file has only a 3000 byte record length, we can still only send 1 record per network packet. In both of these cases a field list query can be quite helpful.
Another example: if only 2 fields are required (totaling 20 bytes), the DataServer can pack 200 field-list records into the 4000 byte network packet. The performance improvement of this can be quite dramatic. Specifying too many fields in the FIELDS phrase. If your field list query specifies more than half of the fields in the file, the additional overhead to process the field list will outweigh the benefit potentially degrading performance. Half the fields in a file is only a rule of thumb.
Other factors (-Mm, record length, total records) must be considered. Generally its probably a good idea to limit the fields in the query (e.g. browser) to just a few, and re-read specific user-selected records by RECID.