MySQL Forums
Forum List  »  Performance

Re: Indexes not being used?
Posted by: David Wynter
Date: December 09, 2005 12:33PM

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

Options: ReplyQuote


Subject
Views
Written By
Posted
2196
December 09, 2005 11:45AM
1432
December 09, 2005 11:51AM
1502
December 09, 2005 11:53AM
1578
December 09, 2005 12:11PM
1364
December 09, 2005 12:12PM
Re: Indexes not being used?
1361
December 09, 2005 12:33PM
1392
December 10, 2005 10:50AM
1464
December 12, 2005 05:14AM
1393
December 13, 2005 03:16AM
1533
December 14, 2005 11:17PM
1497
December 16, 2005 11:46AM
1422
December 26, 2005 08:32PM
1412
December 14, 2005 10:47PM
1426
December 23, 2005 12:29PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.