MySQL Forums
Forum List  »  Performance

Re: FORCE INDEX use?
Posted by: KimSeong Loh
Date: August 15, 2005 06:40PM

You still cannot use the Event_Time index here.

Reason, is that MySQL can only use 1 index per table, and the index it selected to use is the Security_Id_idx, which is used to perform the join with table cw.

If you want to use the index, create a composite index on these 2 columns (Security_Id_idx,Event_Time), then it will reduce the "Using where" for table ev.
ev is not the first table read in this query.


In the earlier query, ev is the first table, so the WHERE condition can make use of an index to select the required rows.


Note that I do not and will not read you long query, but only extract the relevant information to show you what you could have misunderstood from you question.

Options: ReplyQuote


Subject
Views
Written By
Posted
14111
August 14, 2005 03:47PM
4147
August 15, 2005 12:40AM
3287
August 15, 2005 05:10AM
3538
August 15, 2005 07:18AM
Re: FORCE INDEX use?
2924
August 15, 2005 06:40PM
2286
August 16, 2005 02:14AM


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.