Re: Odd out of memory problem. - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Odd out of memory problem.
Date
Msg-id CA+U5nMKL2mcrw3Q72dBO87wO0-x8ppEYzYRpwbDP0snBCUkoyg@mail.gmail.com
Whole thread Raw
In response to Re: Odd out of memory problem.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Mar 26, 2012 at 5:43 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Hm.  This illustrates that it's not too prudent to rely on a default
> numdistinct estimate to decide that a hash aggregation is safe :-(.
> We had probably better tweak the cost estimation rules to not trust
> that.  Maybe, if we have a default estimate, we should take the worst
> case estimate that the column might be unique?  That could still burn
> us if the rowcount estimate was horribly wrong, but those are not nearly
> as shaky as numdistinct estimates ...

The selectivity API should include some way of indicating the accuracy
of the answer, as well as the answer itself.

That way we could respond better in a wide range of circumstances.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Odd out of memory problem.
Next
From: Heikki Linnakangas
Date:
Subject: Re: Odd out of memory problem.