pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Markus Schaber <schabi@logix-tt.com>
Cc: ogjunk-pgjedan@yahoo.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Help with a seq scan on multi-million row table
Date: Thu, 11 May 2006 09:46:00 -0400
Message-ID: <6135.1147355160@sss.pgh.pa.us> (raw)
In-Reply-To: <44631313.1020100@logix-tt.com>
References: <20060511034711.46266.qmail@web50305.mail.yahoo.com>
	<44631313.1020100@logix-tt.com>

Markus Schaber <schabi@logix-tt.com> writes:
> Did you try to set higher statistics targets for this columns?

Yeah, I was about to suggest the same after looking at the pg_stats
entry.  It shows estimated num_distinct as 60825, ie only about 60k
distinct values in the column, which sounds kinda low (do you know
the true figure?).  A larger statistics target would probably produce
a better number and hence a better join estimate.

			regards, tom lane



view thread (12+ messages)  latest in thread

Message-ID: <6135.1147355160@sss.pgh.pa.us>
Permalink:  ../6135.1147355160@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6135.1147355160@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-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, schabi@logix-tt.com, ogjunk-pgjedan@yahoo.com
  Subject: Re: Help with a seq scan on multi-million row table
  In-Reply-To: <6135.1147355160@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