It may be that you have many rows in each table for the same customer.
This could cause the same row to be updated many times.

The key here is to minimize the actual updates taking place.

A better syntax would be:

UPDATE t2008 SET Receipt ='Y'  Where Cust_no in (select distinct Cust_no  FROM 
t2007)

The rows in T2008 will be updated only once with this syntax.

Dennis McGrath
________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of John Engwer
Sent: Monday, November 09, 2009 10:08 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Update taking a long time

I am trying to update a column in temporary table t2008 based on data in 
temporary table t2007.  There are about 4000 - 5000 rows in each table and the 
column CUST_NO is indexed in both tables.
I am trying to figure out why the update takes so long, approximately 3 
minutes.  That seem like an excessive amount of time with only 4000 rows in the 
tables.

UPDATE t2008 SET Receipt ='Y' FROM t2008 t1,t2007 t2 WHERE t1.CUST_NO = 
t2.CUST_NO
Using V8,  11/02/2009 build

John

Reply via email to