MySQL Forums
Forum List  »  Optimizer & Parser

Re: Query taking a lot of time if there is no record in table
Posted by: Rick James
Date: April 30, 2009 11:31PM

I have encountered that problem with older versions of MySQL in InnoDB, but have not found whether or when it was fixed. What version are you using?

DATE(RATE_TIME) -- Do not take a function of an index column; it prevents using the index. In this case, the DATE() function is unnecessary; this should work fine:
... AND RATE_TIME = '2008-11-01'
and help it use the index.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Query taking a lot of time if there is no record in table
2365
April 30, 2009 11:31PM


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.