Re: a question about row estimation in postgres

From: Nathan Boley <nboley(at)berkeley(dot)edu>
To: Reynold Xin <rxin(at)cs(dot)berkeley(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: a question about row estimation in postgres
Date: 2011-03-20 21:22:19
Message-ID: AANLkTimeoO-Njw1SF-ieaQsy_65cyx01JG6FpndGeO1=@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Following the formula outlined
> in http://www.postgresql.org/docs/8.3/static/row-estimation-examples.html
> Both gradrate 10 and gradrate 11 would fall in the first bucket.
> Shouldn't the row estimation be:
> (11 - 8) / (33 - 8) / 10 * 1302 = 15.624
> and
> (10 - 8) / (33 - 8) / 10 * 1302 = 10.416
> instead of 11 and 7?
> Perhaps I am missing something. I'd appreciate if you can point it out.

IIRC, you need to subtract the rows that are mcv's from the row count.
ie, you're not working with the full 1302 rows, only the ones that are
not mcv's.

Best,
Nathan

In response to

Browse pgsql-general by date

  From Date Subject
Next Message ray joseph 2011-03-21 00:54:09 Re: Database Design for Components and Interconnections
Previous Message Tomas Vondra 2011-03-20 20:31:55 Re: a question about row estimation in postgres