Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: Stewart Chew
  Where is Stewart Chew?
 
 Malaysia
 Stewart Chew
 Tags
Subject: RE: Insert & Update records
Thread ID: 145129 Message ID: 146001 # Views: 18 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Thursday, September 20, 2007 2:00:53 PM         
   


Stewart,
I didn't check your long message, just seeing the few paragraph, wanted to add this as a side note:

One of the reasons an SQL insert/update would take a long time is that table's reccount is off by 1 in header compared to actual recordcount. This is not reported as an error when tablevalidate is set to 0 (or in earlier versions of VFP). TableValidate > 0 on the other hand causes to slow down if tables in question are not open and exclusive off.

Update SQL, unlike replace all, uses record locking and batch updates might be slower, fail while processing if another user is holding a lock on a record, set reprocess is auto and it might be waiting to acquire a lock (sort of deadlock) etc. Other users' opening the table type (un/buffered) and locks affect it in other words.

Besides the update itself check 'from ...' parts of it. That part might be slow due to several factors like not optimizable expressions, multiple UDF calls, not using == but =, cpcurrent() <> cpdbf() etc

Cetin Basoz



COMPLETE THREAD
Insert & Update records Posted by Stewart Chew @ 9/13/2007 8:47:55 AM
RE: Insert & Update records Posted by tushar @ 9/13/2007 10:12:55 AM
RE: Insert & Update records Posted by Stewart Chew @ 9/13/2007 11:33:53 AM
RE: Insert & Update records Posted by Ken Murphy @ 9/13/2007 12:40:19 PM
RE: Insert & Update records Posted by Stewart Chew @ 9/18/2007 3:54:33 AM
RE: Insert & Update records Posted by tushar @ 9/18/2007 11:44:22 AM
RE: Insert & Update records Posted by Ken Murphy @ 9/18/2007 2:12:41 PM
RE: Insert & Update records Posted by Stewart Chew @ 9/19/2007 2:39:21 AM
RE: Insert & Update records Posted by Ken Murphy @ 9/19/2007 2:55:43 PM
RE: Insert & Update records Posted by Stewart Chew @ 9/20/2007 4:18:16 AM
RE: Insert & Update records Posted by Ken Murphy @ 9/20/2007 1:45:31 PM
RE: Insert & Update records Posted by Cetin Basoz @ 9/20/2007 2:05:02 PM
RE: Insert & Update records Posted by Ken Murphy @ 9/20/2007 2:14:16 PM
RE: Insert & Update records Posted by Cetin Basoz @ 9/20/2007 2:26:32 PM
RE: Insert & Update records Posted by Ken Murphy @ 9/20/2007 2:43:10 PM
RE: Insert & Update records Posted by Cetin Basoz @ 9/20/2007 2:00:53 PM