MySQL Forums
Forum List  »  Performance

Re: Composite index - selecting components and order
Posted by: Rick Ingram
Date: May 08, 2013 06:55AM

Rick James Wrote:
-------------------------------------------------------
>
> There are 4 things in the WHERE clause; any one of
> them _might_ be the best for the index. It is
> unlikely that the optimizer can use more than one.
> (In 5.6, it _might_ be able to use two fields.)
>


Are you saying that composite indexes with more than one item in them are a bad thing?

I was of the impression that you wanted many items from your WHERE clause, in the order they appear in the WHERE, for optimum performance.

The whole point of this thread is to determine if min/max from SELECT and or GROUP BY and ORDER BY items should be added and in which order.

The suggestion that indexes should only have 2 items in them would make for totally different schema design choices.

Options: ReplyQuote




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.