Progress
Programming
Handbook


Updating and Deleting with Field Lists

After fetching a field list, if your procedure updates the fetched record, Progress always rereads the complete record before completing the update. In fact, if you fetch a field list with EXCLUSIVE–LOCK, Progress reads the complete record anyway. This is to ensure proper operation of updates and the before-image (BI) file. (For information on BI files, see the Progress Client Deployment Guide.)

Also, if you delete a record after fetching a field list for it, Progress rereads the complete record for the following cases:

Thus, if you fetch with NO–LOCK or SHARE–LOCK, avoid using field lists if you expect to perform a high ratio of updates or deletes to fetches. For example, this is an inefficient construction with a Progress database:

FOR EACH customer FIELDS (name balance): 
    DISPLAY "Deleting customer" name "with balance:" balance. 
    DELETE customer. 
END. 

This procedure rereads the complete record for each field list that it fetches, and thus fetches twice per record. Without the field list, the same procedure fetches only once per record.

Updating and Deleting with Query Field Lists

For queries, especially those attached to a browse widget, there is little concern about updates and deletes, because the complete results list for a query is built before any updates or deletes take place. In this case, updates and deletes are selective over the entire query. Therefore, field lists can greatly enhance query performance, no matter how many updates or deletes a browse user completes. For more information on browse widgets, see Using the Browse Widget."


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095