Consultor Eletrônico



Kbase P101664: Using the FIELDS option can greatly improve Client Server performance of a FOR EACH
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   01/03/2005
Status: Unverified

SYMPTOM(s):

poor performance with a FOR EACH

Client server connection (remote connection)

CHANGE:

A SELECT is faster

CAUSE:

The table has large fields that are not necessary for the query. By default, the FOR Statement makes the full records travel through the wire.

FIX:

Use the FIELDS option to limit the number of fields through the wire so only the necessary ones will take network bandwidth, as illustrated bellow:
FOR EACH customer FIELD (custnum name) NO-LOCK:
/* Only custnum and name are required in the DISPLAY, no need
to let others go through the wire */
DISPLAY customer.custnum customer.name.