Re: Proposal - improve eqsel estimates by including histogram bucket numdistinct statistics

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Nathan Boley" <npboley(at)gmail(dot)com>
Cc: "Jeff Davis" <pgsql(at)j-davis(dot)com>, "Zeugswetter Andreas OSB sIT" <Andreas(dot)Zeugswetter(at)s-itsolutions(dot)at>, "Gregory Stark" <stark(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal - improve eqsel estimates by including histogram bucket numdistinct statistics
Date: 2008-06-10 18:54:11
Message-ID: 22404.1213124051@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Nathan Boley" <npboley(at)gmail(dot)com> writes:
> If we query on values that aren't in the table, the planner will
> always overestimate the expected number of returned rows because it (
> implicitly ) assumes that every query will return at least 1 record.

That's intentional and should not be changed. I can't see the value
of allowing fractional-row estimates anyway. Now if we can *prove*
the query matches no rows, that's a whole nother matter, but statistics
won't help us with that.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Boley 2008-06-10 19:16:11 Re: Proposal - improve eqsel estimates by including histogram bucket numdistinct statistics
Previous Message Nathan Boley 2008-06-10 18:46:02 Re: Proposal - improve eqsel estimates by including histogram bucket numdistinct statistics