Re: Help with a seq scan on multi-million row table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Markus Schaber <schabi(at)logix-tt(dot)com>
Cc: ogjunk-pgjedan(at)yahoo(dot)com, pgsql-sql(at)postgresql(dot)org
Subject: Re: Help with a seq scan on multi-million row table
Date: 2006-05-11 13:46:00
Message-ID: 6135.1147355160@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Markus Schaber <schabi(at)logix-tt(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Andreas Kretschmer 2006-05-11 16:13:33 Re: Multi-column index not used, new flipped column index is
Previous Message Christian Paul Cosinas 2006-05-11 12:00:11 ORDER BY question