MySQL Forums
Forum List  »  Optimizer & Parser

Re: select distinct slower in 5.0 than 4.1
Posted by: Jay Pipes
Date: December 19, 2005 10:49AM

Saar Barhoom wrote:
> On 4.1.16 this query runs very fast. Using the
> EXPLAIN SELECT I see that the 'type' of the query
> is 'ref'.
> On 5.0.16 this query runs very slow (about x20
> times slower). EXPLAIN SELECT show that the 'type'
> of the query is 'range'.
>
> Could that be related to the loose index scan
> feature of 5.0?

Probably not; with the loose index scan, you'd see something like "Using index group-by" in the Extra column, if I remember correctly...

More likely, it might be a difference in the data setsbeing operated on. Are both schema identical? Are the data sets identical? Also, could you post the SHOW CREATE TABLE and EXPLAIN output for each? Thanks!

Jay Pipes
Community Relations Manager, North America, MySQL Inc.

Got Cluster? http://www.mysql.com/cluster
Personal: http://jpipes.com

Options: ReplyQuote


Subject
Views
Written By
Posted
3426
December 18, 2005 12:24PM
Re: select distinct slower in 5.0 than 4.1
2662
December 19, 2005 10:49AM
2327
December 20, 2005 11:36AM


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.