MySQL Forums
Forum List  »  Optimizer & Parser

Re: Optimize Query with SUM() and CASE... statements
Posted by: Anthony Willard
Date: May 08, 2006 07:57AM

What you are trying to accomplish with your CASE statements since they test different columns for a value - not a single column for various values? I'm not quite sure which would be effective in a given situation, likely the first 'true' clause - which may not be what you want.

You can improve performance by having good indexes on all the WHERE columns that are available for a user to select.

Options: ReplyQuote

Written By
Re: Optimize Query with SUM() and CASE... statements
May 08, 2006 07:57AM

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.