Sergy, Thanks a million, you came throug again! Time for update is now 0.084 seconds.
Here is the revised code. The k_memo key is the parent key. All I had to do was add it.
update bsmemo set textln = c_memo.textln ;
from c_memo join bsmemo on c_memo.k_seqno = bsmemo.k_seqno ;
where bsmemo.k_memo = mk_memo and ;
c_memo.updtflag = 'U'
>You don't have a filter on bsmemo table so every record in bsmemo will be locked one by one.
>
>>Thanks for looking that up. The k_seqno keys are unique autoinc keys in bsmemo. So I would assume that it would only need to lock the 3 records in bsmemo where the keys matched the 3 recs in c_memo. Am I correct or do I have it wrong?
>>
>>>Hi John,
>>>
>>>See
Re: Why this DELETE is so slow? Message #
989423 for explanation.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn