MySQL Forums
Forum List  »  Optimizer & Parser

Re: Need help optmizing query
Posted by: KimSeong Loh
Date: January 16, 2007 06:42PM

Make sure you have an index on tran.c_id

Change
ORDER BY cus.name ASC, tran.date DESC
to
ORDER BY tran.date DESC

You already have a WHERE that restrict to 1 cus.name, so no need to order by cus.name again.

Options: ReplyQuote


Subject
Views
Written By
Posted
2630
January 16, 2007 03:58PM
Re: Need help optmizing query
2022
January 16, 2007 06:42PM


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.