Re: Encouraging multi-table join order - Mailing list pgsql-performance

From Tom Lane
Subject Re: Encouraging multi-table join order
Date
Msg-id 11015.1144790963@sss.pgh.pa.us
Whole thread Raw
In response to Re: Encouraging multi-table join order  (Dan Harris <fbsd@drivefaster.net>)
List pgsql-performance
Dan Harris <fbsd@drivefaster.net> writes:
> I wonder why the estimates were so far off the first time?  This table
> has been ANALYZED regularly ever since creation.

Probably just that you need a bigger sample size for such a large table.
We've been arguing ever since 7.2 about what the default statistics
target ought to be --- a lot of people think 10 is too small.  (It could
also be that the fixed 300X multiplier ought to depend on table size
instead.  The math that told us 300X was OK was really about getting the
histogram right, not about whether the most-common-values stats would be
any good.)

            regards, tom lane

pgsql-performance by date:

Previous
From: Dan Harris
Date:
Subject: Re: Encouraging multi-table join order
Next
From: markir@paradise.net.nz
Date:
Subject: Re: Sequencial scan instead of using index