pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: marcin mank <marcin.mank@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: kouber@saparev.com
Cc: pgsql-performance@postgresql.org
Subject: Re: LIMIT confuses the planner
Date: Mon, 23 Mar 2009 01:56:50 +0100
Message-ID: <b1b9fac60903221756ifd951a3o4d8cb25854f2ade9@mail.gmail.com> (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>

> I hit an interestinhg paper on n_distinct calculation:
>
> http://www.pittsburgh.intel-research.net/people/gibbons/papers/distinct-values-chapter.pdf
>
> the PCSA algorithm described there requires O(1) calculation per
> value. Page 22 describes what to do with updates streams.
>
> This I think (disclaimer: I know little about PG internals) means that
> the n_distinct estimation can be done during vacuum time (it would
> play well with the visibility map addon).
>
> What do You think?

ok, if You think that calculating a has function of every data field
for each insert or delete is prohibitive, just say so and don`t bother
reading the paper :]

Greetings
Marcin



view thread (14+ messages)  latest in thread

Message-ID: <b1b9fac60903221756ifd951a3o4d8cb25854f2ade9@mail.gmail.com>
Permalink:  ../b1b9fac60903221756ifd951a3o4d8cb25854f2ade9@mail.gmail.com/
Also on:    postgresql.org/message-id/b1b9fac60903221756ifd951a3o4d8cb25854f2ade9@mail.gmail.com

 · 

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: marcin.mank@gmail.com, tgl@sss.pgh.pa.us, kouber@saparev.com
  Subject: Re: LIMIT confuses the planner
  In-Reply-To: <b1b9fac60903221756ifd951a3o4d8cb25854f2ade9@mail.gmail.com>

* 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