Subject Indexes being used in UPDATE OR INSERT Matching clause
Author Marius Labuschagne
Hi,

Can someone tell me if when making use of a update or insert statement, if
indexes on the MATCHING fields will be used when performing the update
portion?

As an example, the following statement:

UPDATE OR INSERT INTO
CONTROLSALES (SALE_DATE, INTRECNO_CUSTOMER, CASHCREDIT, SALESTOTALEX,
SALESVAT, LINECODE, BRANCHNO, ORIGINALID, APPROVALNO, ORIGINATION, LOANTERM,
CBT_ID, LOYALTYNUMBER, TENDER_CASH, TENDER_CREDITCARD, TENDER_DEBITCARD,
TENDER_CHEQUES, TENDER_VOUCHERS, CUSTOMERNO, TENDERTRANSACTION,
SALE_DATE_DO)
VALUES
('10/28/2010 19:21:48.000', 0, 'Cash', 40.31, 5.64, '522-28/06/2010-7:15:36
PM-8036:AA16_879634', 'QTP', 123721, '', '', 0, 'IID740013', '', 100, 0, 0,
0, 0, '', 4000, '10/28/2010')
MATCHING (BRANCHNO, ORIGINALID)

Will both my BRANCHNO and ORIGINALID field indexes be used?



Regards
Marius J. Labuschagne
N Dip CDP, B Com (Strategy and IT), IMM Marketing, PPIM, PRINCE2 Certified

Turnkey Information Systems cc