pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: marcin mank <marcin.mank@gmail.com>
Cc: kouber@saparev.com
Cc: pgsql-performance@postgresql.org
Subject: Re: LIMIT confuses the planner
Date: Sun, 22 Mar 2009 22:18:57 -0400
Message-ID: <21519.1237774737@sss.pgh.pa.us> (raw)
In-Reply-To: <b1b9fac60903221712n255525a6w8575ccb4a75d56bb@mail.gmail.com>
References: <49A295F0.5010405@saparev.com>
	<49A2A450.20002@archonet.com>
	<49A2DFFA.8000001@saparev.com>
	<18725.1235412110@sss.pgh.pa.us>
	<49A429A3.9010803@saparev.com>
	<17814.1237757356@sss.pgh.pa.us>
	<b1b9fac60903221712n255525a6w8575ccb4a75d56bb@mail.gmail.com>

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



view thread (14+ messages)  latest in thread

Message-ID: <21519.1237774737@sss.pgh.pa.us>
Permalink:  ../21519.1237774737@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21519.1237774737@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, marcin.mank@gmail.com, kouber@saparev.com
  Subject: Re: LIMIT confuses the planner
  In-Reply-To: <21519.1237774737@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox