MySQL Forums
Forum List  »  Optimizer & Parser

Re: select distinct slower in 5.0 than 4.1
Posted by: KimSeong Loh
Date: December 27, 2005 06:49PM

If you already have a unique constraint on (pid,lastname), is there a need of the distinct in your select when you have a where condition with = on the lastname?
The distinct seems to be redundant and it makes MySQL do extra work to check for duplicates when there will not be any.

Options: ReplyQuote

Written By
December 18, 2005 12:24PM
December 19, 2005 10:49AM
December 20, 2005 11:36AM
Re: select distinct slower in 5.0 than 4.1
December 27, 2005 06:49PM

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.