Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Slooooooooooow UPDATE
Message
 
 
To
03/08/2010 14:20:39
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01475043
Message ID:
01475045
Views:
112
This message has been marked as the solution to the initial question of the thread.
UPDATE-SQL locks and unlocks each row it updates and even some rows it doesn't update. Because of that it'll be always slower than REPLACE FOR that lock the table. To see if lock slows the UPDATE, try to FLOCK the table before UPDATE .

>
>I have just recently learned of UPDATE-SQL and am now trying to use it. There's something I have missed, however, because the following executes really slow ... a minute or more to execute!
>
Update  KitDetail Set		;
>		  ReceivFlag = .T.		;
>	From c_TransferDetail		;
>	Where c_TransferDetail.Received	;
>		And c_TransferDetail.NonInvID = KitDetail.UniqueKey			;
>		And KitDetail.UniqueKey # 0
>KitDetail is table indexed by UniqueKey.
>c_TransferDetail is a cursor with maybe 20 to 50 records in it.\
>
>Previously, I handled this with SET RELATION into KitDetail, and it completed essentially instantly.
>
>OK, so what am I missing here?
>
>Thanks so much in advance,
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform