It is strange that this kind of update is so slow, but that has been the case 
as long as I can remember.

For tables that have a PK I have resorted to this to get a fast update.

UPDATE Tablename set...  where PKID in  (select PKID from tablename 
where........)

I'll remember your method where this will not work.

Dennis McGrath


From: [email protected] [mailto:[email protected]] On Behalf Of Michael J. 
Sinclair
Sent: Saturday, December 06, 2014 11:35 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Speeding up my with temporary views

Hi All,
I have some rbase apps that are running a little bit slower than I would like. 
The lines of code that are slow, are updates to some very large tables.
For example, I may want to update a column called flag on every line where the 
column client_id = 1234 and there are 1000 lines out of a million lines that 
meet that criteria.
Even though I have an index on the column client_id, it still takes a few 
seconds.
I created a temporary view, single table, and restricted it to just the rows 
with the client_id of the current client. All my changes are now much faster 
and appear to be being updated in the source table.
Is the use of a temporary single table view the best choice?
Mike

Reply via email to