>>The following is extremely slow over one network (23 seconds), whereas at other sites takes less than 1 sec.
>>Patx is a DBF with 28,000 records (indexed on patuid)
>>TmpSync is a cursor with one record
>>
UPDATE patx ;
>>FROM tmpSync ;
>>SET ;
>> patx.ins = tmpSync.inscode + tmpSync.feecode, ;
>> patx.pgroup = tmpSync.groupid ;
>>WHERE patx.patuid = tmpSync.patuid
>>
>>I was under the impression that UPDATE SQL locks records, as needed, but that may not be so. SCAN / REPLACE is much faster in my tests.
>
>If this is a one record cursor (is it always just one row) then have you tried using variables instead? Does the main table have deleted rows? What is SET DELETED status?
Hi Naomi,
Sorry for the late reply. I ended up using SCAN/SEEK/REPLACE, however I am still interested in the reasons for the slow SQL update, nonetheless.
Yes, it is a 1 rec cursor, so your suggestion to use variables makes sense.
SET DELETED is ON and the main table may have a few deleted records.
Thank you.