MySQL Forums
Forum List  »  Optimizer & Parser

Re: how to optimise query for 10+ millions records
Posted by: Rick James
Date: February 18, 2012 07:18AM

Using indexed fields inside function calls (such as IF()) makes it so the indexes cannot be used. Reforumate thus:

JOIN IN_ROUTE on p_CarrierType = 0 AND axecdr.IN_Route = IN_ROUTE.VALUE

JOIN OUT_ROUTE ON p_CarrierType = 1 AND axecdr.OUT_Route = OUT_ROUTE.VALUE

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: how to optimise query for 10+ millions records
1270
February 18, 2012 07:18AM


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.