pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: josh@agliodbs.com
Cc: pgsql-perform <pgsql-performance@postgresql.org>
Subject: Re: Bad n_distinct estimation; hacks suggested?
Date: Tue, 19 Apr 2005 16:44:49 -0400
Message-ID: <25382.1113943489@sss.pgh.pa.us> (raw)
In-Reply-To: <200504191209.05181.josh@agliodbs.com>
References: <200504191209.05181.josh@agliodbs.com>

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



view thread (53+ messages)  latest in thread

Message-ID: <25382.1113943489@sss.pgh.pa.us>
Permalink:  ../25382.1113943489@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25382.1113943489@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, josh@agliodbs.com
  Subject: Re: Bad n_distinct estimation; hacks suggested?
  In-Reply-To: <25382.1113943489@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