Hi All -
I'm updating a column in a 1.2 megarow table (TxnHist) with values from a column in a temp table (ChryPaid) that may have a few thousand rows, based on three columns matching between the two tables.

I remember previous posts about use of parenthesis to force (or ignore?) use of indexed columns and the best order in which to list the columns. Unfortunately I can't find that post 'cause I'm asking those questions again:
How should I use parenthesis to optimize the WHERE clause?
Does the order of the columns matter? i.e. most unique listed first or last?
  Are these even a concern if MANOPT is OFF?

The reason I'm asking is that it took about an hour run the following command:

UPDATE TxnHist +
  SET ChryInvNbr = INV.ChryInvNbr +
  FROM ChryInvDtlTmp INV, TxnHist TXN  +
  WHERE  +
  (INV.VPlNmbr = TXN.VPlNmbr AND +
  INV.CusPnbr = TXN.CusPnbr AND +
  INV.InvoiceDate = TXN.TxDate)

Column CusPnbr in table TxnHist is an FK, the other five columns in the WHERE clause are single-column indices.
The most unique column in TxnHist is VPlNmbr.

Settings in the RBASE.DAT file are:
SET STATICDB ON
SET FASTLOCK ON
SET QUALCOLS 2

MANOPT is not set in RBASE.DAT or in code, I believe, so it is OFF by default.

Per Taskmanager, Network utilization is 17% on a 100 mbps connection (high?). CPU usage is about 10% to 15%.
This is on an XP machine with 2 Gb RAM.
R:Base is version 9.5.5.20116.

Thanks much for your help and my apologies for the repeat questions.
Doug

---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com


Reply via email to