Re: Bad n_distinct estimation; hacks suggested?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: josh(at)agliodbs(dot)com
Cc: "pgsql-perform" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Bad n_distinct estimation; hacks suggested?
Date: 2005-04-19 20:44:49
Message-ID: 25382.1113943489@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

Josh Berkus <josh(at)agliodbs(dot)com> writes:
> As you can see, n_distinct estimation is off by a factor of 10x and it's
> causing query planning problems. Any suggested hacks to improve the
> histogram on this?

What's the histogram itself look like? (I'd like to see the whole
pg_stats row not just part of it ...) There's probably no point in
showing the target=1000 version, but maybe target=100 would be
informative.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruno Wolff III 2005-04-19 20:48:56 Re: inet increment w/ int8
Previous Message Matthew T. O'Connor 2005-04-19 19:44:15 Re: Win32 presentation

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2005-04-19 21:33:58 Re: Bad n_distinct estimation; hacks suggested?
Previous Message Dave Held 2005-04-19 20:01:57 Re: Bad n_distinct estimation; hacks suggested?