Marc, 

  I would not use Delete Rows from a temp table when wanting to remove all 
rows.  This is much slower 

if there are any number of rows to delete. 



Instead try, 



Drop table Tran_spd 

Project temp Tran_Spd from (Permanent empty table name of same column 
structure) using all 

   or 

If Speedov has the same column names, skip the insert and 



Project temp Tran_Spd from Speedov using (column list) where...... 



This may prove even faster yet.   However, note that a lock will be placed on 
Speedov if you 

use the project from it.  Otherwise project using Where limit = 0 and then use 
the Insert if a lock 

on the table would be problematic. 



You do not say how many records are being inserted at a time.  You do not show 
building an 

index on your temp table.  I normally do not use indexes on temp tables unless 
there is a lot of 

data and of a type that an index would help with.   If you have indexes and are 
using the 

Delete Rows command, that will definitely be slower as it has to update all the 
indexes as well. 



As Karen stated, make sure your temp settings are local. 

-Bob 

----- Original Message ----- 
From: [email protected] 
To: "RBASE-L Mailing List" <[email protected]> 
Sent: Thursday, May 21, 2009 2:53:10 PM GMT -06:00 US/Canada Central 
Subject: [RBASE-L] - Re: Workstation speed 

Marc:   Have you tried using a permanent table in 7.5 to see if it's faster 
than using the temp table?    And if you're using temp tables, make sure your 
scratch setting is to a local drive (like SET SCRATCH C:\TEMP)  so that temp 
table information is kept local rather than traveling through the network. 

Karen 




This is the second office that has brought up the issue of Rbase getting slower 
as the day wears on. 
  
This tech is a certified network guy so I assume the network is OK, new 
computers 1 gig switches ... 
  
My old code used a regular table and I would just delete rows .....but I never 
heard a complaint on 
the speed 
  
-- tran_spd is a temp table that is created on start of the main menu 
  DELETE ROWS FROM tran_spd 
-- APPEND  .... using append instead of insert does not seem to make any 
difference 
    
  INSERT + 
INTO tran_spd (custnum,date_con,tr_date,tr_type,ch_code,ch_price,+ 
ptest,dig_ch,memo,treat_dr,inscomp,inshold,modf1,modf2,modf3,+ 
modf4  ) SELECT custnum,date_con,tr_date,tr_type,ch_code,ch_price,+ 
ptest, dig_ch,memo,treat_dr,inscomp,inshold,modf1,modf2,modf3,+ 
modf4   FROM speedov WHERE custnum = .vaptcust 
  
  EDIT USING spdyov2 + 
WHERE tr_type = 1 AND custnum = .vcust CAPTION .vcap 
  
Then then click a button to Save or append these charges to another table then 
go back to this same EEP again. 
  
Even if I drop Temp tab and Project Temp tab is not faster 
  
I think is it my program logic not 7.5, but my old permanent table in 6.5 was 
faster than the 
temp table in 7.5 

Why would using Temp table be slower? 
  
  
Marc 


  
This tech is a certified network guy so I assume the network is OK, new 
computers 1 gig switches ... 
  
My old code used a regular table and I would just delete rows .....but I never 
heard a complaint on 
the speed 
  
-- tran_spd is a temp table that is created on start of the main menu 
  DELETE ROWS FROM tran_spd 
-- APPEND  .... using append instead of insert does not seem to make any 
difference 
    
  INSERT + 
INTO tran_spd (custnum,date_con,tr_date,tr_type,ch_code,ch_price,+ 
ptest,dig_ch,memo,treat_dr,inscomp,inshold,modf1,modf2,modf3,+ 
modf4  ) SELECT custnum,date_con,tr_date,tr_type,ch_code,ch_price,+ 
ptest, dig_ch,memo,treat_dr,inscomp,inshold,modf1,modf2,modf3,+ 
modf4   FROM speedov WHERE custnum = .vaptcust 
  
  EDIT USING spdyov2 + 
WHERE tr_type = 1 AND custnum = .vcust CAPTION .vcap 
  
Then then click a button to Save or append these charges to another table then 
go back to this same EEP again. 
  
Even if I drop Temp tab and Project Temp tab is not faster 
  
I think is it my program logic not 7.5, but my old permanent table in 6.5 was 
faster than the 
temp table in 7.5 

Why would using Temp table be slower? 
  
  
Marc 



This is the second office that has brought up the issue of Rbase getting slower 
as the day wears on. 
  
This tech is a certified network guy so I assume the network is OK, new 
computers 1 gig switches ... 
  
My old code used a regular table and I would just delete rows .....but I never 
heard a complaint on 
the speed 
  
-- tran_spd is a temp table that is created on start of the main menu 
  DELETE ROWS FROM tran_spd 
-- APPEND  .... using append instead of insert does not seem to make any 
difference 
    
  INSERT + 
INTO tran_spd (custnum,date_con,tr_date,tr_type,ch_code,ch_price,+ 
ptest,dig_ch,memo,treat_dr,inscomp,inshold,modf1,modf2,modf3,+ 
modf4  ) SELECT custnum,date_con,tr_date,tr_type,ch_code,ch_price,+ 
ptest, dig_ch,memo,treat_dr,inscomp,inshold,modf1,modf2,modf3,+ 
modf4   FROM speedov WHERE custnum = .vaptcust 
  
  EDIT USING spdyov2 + 
WHERE tr_type = 1 AND custnum = .vcust CAPTION .vcap 
  
Then then click a button to Save or append these charges to another table then 
go back to this same EEP again. 
  
Even if I drop Temp tab and Project Temp tab is not faster 
  
I think is it my program logic not 7.5, but my old permanent table in 6.5 was 
faster than the 
temp table in 7.5 

Why would using Temp table be slower? 
  
  
Marc 


Reply via email to