|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Krishna Chandra Prajapati (prajapatikc
gmail.com)
Date: Tue Apr 08 2008 - 01:06:18 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks a lot
On Mon, Apr 7, 2008 at 10:59 AM, Rob Wultsch <wultsch
gmail.com> wrote:
> On Sun, Apr 6, 2008 at 9:57 PM, Eric Bergen <eric
provenscaling.com>
> wrote:
> > I don't see what the issue is. As Jay said the row counts in explain
> > outputs are estimates. When running an explain query MySQL asks the
> > storage engine how many rows it thinks are between a set of values for
> > an index. Different storage engines use different methods to calculate
> > row count. Both innodb and myisam estimate the row count based on
> > statistics they keep on the distribution of keys in an index. MyISAM
> > is more accurate than innodb with it's row count because of how it
> > keeps statistics. Analyze table on a myisam table will count the
> > number of unique values in an index
> > (myisam/mi_check:update_key_parts). Innodb samples the key
> > distribution in 8 different pages per index and does some calculations
> > based on the tree structure of those pages (details
> > innobase/btr/btr0cur.c:btr_estimate_number_of_different_key_vals).
>
> Thank you! I spent a bit trying to find details about how row counts
> were computed, but with no luck (I probably did not know how to know
> how to look...). Could the alternative I had proposed be accurate at
> all?
>
> --
> Rob Wultsch
> wultsch
gmail.com
> wultsch (aim)
>
--
Krishna Chandra Prajapati
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]