MySQL Forums
Forum List  »  General

Re: Complex Query - Optimization
Posted by: Felix Sheng
Date: November 02, 2004 09:24AM

Robert - this is a pre-coffee suggestion so may not be feasible. But first would be to make sure you have indexes on (day, hour) and (room). Possibly you might want to try removing the DISTINCT from your sub-select - which would obviously increase the number of rooms in the in, but might prevent mysql from having to sort. Although, if you only have 2000 records and it is taking 10 secs, I suspect something else is wrong...

Options: ReplyQuote


Subject
Written By
Posted
November 01, 2004 11:44AM
Re: Complex Query - Optimization
November 02, 2004 09:24AM


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.