Re: Indexes not being used?
Results from your query are
1, 'PRIMARY', 'cw', 'ref', 'IX_P1', 'IX_P1', '4', 'const', 899, ''
1, 'PRIMARY', 'u', 'ref', 'IX_C1', 'IX_C1', '12', 'smaster.cw.C1', 10, 'Using where'
2, 'UNION', 'cw', 'ref', 'IX_P1', 'IX_P1', '4', 'const', 899, ''
2, 'UNION', 'u', 'ref', 'IX_R1', 'IX_R1', '23', 'smaster.cw.R1', 1, 'Using where'
3, 'UNION', 'cw', 'ref', 'IX_P1', 'IX_P1', '4', 'const', 899, ''
3, 'UNION', 'u', 'ref', 'IX_I1E1', 'IX_I1E1', '19', 'smaster.cw.ISIN,smaster.cw.E1', 1, 'Using where'
4, 'UNION', 'cw', 'ref', 'IX_P1', 'IX_P1', '4', 'const', 899, ''
4, 'UNION', 'u', 'ref', 'IX_S1', 'IX_S1L', '11', 'smaster.cw.SEDOL', 1, 'Using where'
5, 'UNION', 'cw', 'ref', 'IX_P1', 'IX_P1', '4', 'const', 899, ''
5, 'UNION', 'u', 'ref', 'IX_V1', 'IX_V1', '9', 'smaster.cw.VALOREN', 46630, 'Using where'
, 'UNION RESULT', '<union1,2,3,4,5>', 'ALL', '', '', '', '', , ''
But be aware my I am trying to UPDATE a column in cw with the values from the u table where the restriction clause is the same as in my test query. Like this:
UPDATE cw, u SET cw.SEC1 = u.SEC_ID WHERE
WHERE cw.C1 = u.C1 OR cw.R1 = u.R1 OR (cw.I1 = u.I1 AND cw.E1 = u.E1)
OR cw.S1 = u.S1 OR cw.V1 = u.V1 AND cw.P1 = 2
thx.
David