Re: LIMIT confuses the planner - Mailing list pgsql-performance

From Tom Lane
Subject Re: LIMIT confuses the planner
Date
Msg-id 21519.1237774737@sss.pgh.pa.us
Whole thread Raw
In response to Re: LIMIT confuses the planner  (marcin mank <marcin.mank@gmail.com>)
List pgsql-performance
marcin mank <marcin.mank@gmail.com> writes:
> I hit an interestinhg paper on n_distinct calculation:
> http://www.pittsburgh.intel-research.net/people/gibbons/papers/distinct-values-chapter.pdf

I don't think we're quite ready to make ANALYZE read every row of a
table in order to estimate n_distinct.  It is an interesting paper
in that it says that you have to do that in order to get *provably*
good estimates, but I've not abandoned the hope of getting *usually*
good estimates without so much work.

            regards, tom lane

pgsql-performance by date:

Previous
From: marcin mank
Date:
Subject: Re: LIMIT confuses the planner
Next
From: Greg Smith
Date:
Subject: Re: "iowait" bug?