Re: Help with a seq scan on multi-million row table - Mailing list pgsql-sql

From Tom Lane
Subject Re: Help with a seq scan on multi-million row table
Date
Msg-id 6135.1147355160@sss.pgh.pa.us
Whole thread Raw
In response to Re: Help with a seq scan on multi-million row table  (Markus Schaber <schabi@logix-tt.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Markus Schaber
Date:
Subject: Re: Help with a seq scan on multi-million row table
Next
From: Andreas Kretschmer
Date:
Subject: Re: Multi-column index not used, new flipped column index is