MySQL Forums
Forum List  »  Knowledge Base

Re: Left joing is taking too much time
Posted by: Paul Svirin
Date: August 27, 2009 01:11AM

Maybe this is one of the troubles:

(date(dt.date) >= '2007-04-01' and date(dt.date) <= '2008-03-01')

because the optimizer cannot predict the results of the function it uses table scan.

Thus, maybe the solution will be to store date and time separately and create index on dates.

-------------------
StarWind Software developer (http://starwindsoftware.com)

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Left joing is taking too much time
1409
August 27, 2009 01:11AM


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.