-rereadnolock startup parameter

rzr

Member
Hello All,

does the second FIND stmt below "reread" the same record again from DB or will it use the cached record from the first FIND stmt ?

FIND FIRST Customer NO-LOCK NO-ERROR.
FIND FIRST Customer NO-LOCK NO-ERROR.

I'm reading a document where it says:

Use Reread Nolock (-rereadnolock) to tell the AVM how to decide between multiple copies of a cached record that were read from the database using NO-LOCK. By default, the AVM chooses the oldest of the NO-LOCK copies. When you start a session with -rereadnolock, the AVM chooses the most recently cached NO-LOCK copy.
 

Casper

ProgressTalk.com Moderator
Staff member
The record is always fetched from the database. -rereadnolock tells the avm to always use the fetched record and not the one cached in memory.
 

rzr

Member
So, if two same FIND stmts are executed and Progress always fetcehes records from the Db for each FIND, do we ever need to use the "-rereadnolock" parameter ?
 

Casper

ProgressTalk.com Moderator
Staff member
Yes actually I think most of us always do want to use -rereadnolock or maye better, should use. Only in some cases it is desirable that the cached record is used while most times one wants the most recent version from the database. So I think it would have been better to make this default beavior and use a parameter to use the cached bahavior.
But anyways there where lots of discussions on this and Progress decided to let the 'cached' behavior default.

Regards,

Casper.
 
Top