Re: LIMIT confuses the planner

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: marcin mank <marcin(dot)mank(at)gmail(dot)com>
Cc: kouber(at)saparev(dot)com, pgsql-performance(at)postgresql(dot)org
Subject: Re: LIMIT confuses the planner
Date: 2009-03-23 02:18:57
Message-ID: 21519.1237774737@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

marcin mank <marcin(dot)mank(at)gmail(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Greg Smith 2009-03-23 04:04:40 Re: "iowait" bug?
Previous Message marcin mank 2009-03-23 00:56:50 Re: LIMIT confuses the planner