List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:October 27 2006 5:33pm
Subject:Re: Optimizer Bug?
View as plain text  
In the last episode (Oct 27), David Hillman said:
> On Oct 27, 2006, at 11:50 AM, Dan Nelson wrote:
> >MySQL is just giving you as much information as it can without
> >actually running the query.  It knows how it will go about running
> >the query (so "type" is known absolutely), but it doesn't know
> >exactly what it will get (so "rows" is only a guess).  Nothing wrong
> >with that.
> 
>    If "type" is known absolutely, and is "ALL", as it was in this  
> case, why would EXPLAIN ever report a "rows" value less than the
> number of rows in the table ( as it did here )?

That I don't know.  If it's an InnoDB table, mysql can't get an
accurate count without reading the entire table so it does a couple of
random index dives to estimate the size, which means each explain is
likely to see a different number.  If it's a MyISAM table, it might be
a bug.  Try duplicating it on 4.1.21 (or preferably 5.0.26) and if it
still happens, file a bug.

-- 
	Dan Nelson
	dnelson@stripped
Thread
Optimizer Bug?David Hillman25 Oct
  • Re: Optimizer Bug?Dan Buettner26 Oct
    • Re: Optimizer Bug?David Hillman27 Oct
      • Re: Optimizer Bug?Dan Nelson27 Oct
        • Re: Optimizer Bug?David Hillman27 Oct
          • Re: Optimizer Bug?Dan Nelson27 Oct