Re: LIMIT confuses the planner

From: Tom Lane
Subject: Re: LIMIT confuses the planner
Date: ,
Msg-id: 21519.1237774737@sss.pgh.pa.us
(view: Whole thread, Raw)
In response to: Re: LIMIT confuses the planner  (marcin mank)
List: pgsql-performance

Tree view

LIMIT confuses the planner  (Kouber Saparev, )
 Re: LIMIT confuses the planner  (Richard Huxton, )
  Re: LIMIT confuses the planner  (Kouber Saparev, )
   Re: LIMIT confuses the planner  (Tom Lane, )
    Re: LIMIT confuses the planner  (Kouber Saparev, )
     Re: LIMIT confuses the planner  (Tom Lane, )
      Re: LIMIT confuses the planner  (marcin mank, )
       Re: LIMIT confuses the planner  (marcin mank, )
       Re: LIMIT confuses the planner  (Tom Lane, )
      Re: LIMIT confuses the planner  (Kouber Saparev, )
 Re: LIMIT confuses the planner  (Robert Haas, )
  Re: LIMIT confuses the planner  (Tom Lane, )
   Re: LIMIT confuses the planner  (Kouber Saparev, )

marcin mank <> 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:

From: Greg Smith
Date:
Subject: Re: "iowait" bug?
From: Romuald Brunet
Date:
Subject: Slower query after psql changed it's execution plan