MySQL Forums
Forum List  »  Optimizer & Parser

Re: CONCAT and Index in where clause
Posted by: Øystein Grøvlen
Date: August 23, 2012 01:15AM

Hi,

Indexes do not apply for expressions involving functions over columns. In your specific case, you should be able to use an index if you rewrite the query as follows:

SELECT * from MyTABLE WHERE YEAR='2012' and MONTH='08' and DAY='21';

Hope this helps,

Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway

Options: ReplyQuote


Subject
Views
Written By
Posted
15155
August 22, 2012 08:45AM
Re: CONCAT and Index in where clause
5225
August 23, 2012 01:15AM
4025
August 23, 2012 09:13PM


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.