Re: Bad n_distinct estimation; hacks suggested? - Mailing list pgsql-performance

From Tom Lane
Subject Re: Bad n_distinct estimation; hacks suggested?
Date
Msg-id 25382.1113943489@sss.pgh.pa.us
Whole thread Raw
In response to Bad n_distinct estimation; hacks suggested?  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Bad n_distinct estimation; hacks suggested?  (Josh Berkus <josh@agliodbs.com>)
List pgsql-performance
Josh Berkus <josh@agliodbs.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

pgsql-performance by date:

Previous
From: "Dave Held"
Date:
Subject: Re: Bad n_distinct estimation; hacks suggested?
Next
From: Josh Berkus
Date:
Subject: Re: Bad n_distinct estimation; hacks suggested?