Re: Incorrect estimates on correlated filters - Mailing list pgsql-performance

From Craig Ringer
Subject Re: Incorrect estimates on correlated filters
Date
Msg-id 48A38ED3.8080500@postnewspapers.com.au
Whole thread Raw
In response to Re: Incorrect estimates on correlated filters  (Decibel! <decibel@decibel.org>)
Responses Re: Incorrect estimates on correlated filters
List pgsql-performance
Decibel! wrote:

> Well... you could try and convince certain members of the community that
> we actually do need some kind of a query hint mechanism... ;)

It strikes me that there are really two types of query hint possible here.

One tells the planner (eg) "prefer a merge join here".

The other gives the planner more information that it might not otherwise
have to work with, so it can improve its decisions. "The values used in
this join condition are highly correlated".

Is there anything wrong with the second approach? It shouldn't tend to
suppress planner bug reports etc. Well, not unless people use it to lie
to the planner, and I expect results from that would be iffy at best. It
just provides information to supplement Pg's existing stats system to
handle cases where it's not able to reasonably collect the required
information.

--
Craig Ringer

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] autovacuum: use case for indenpedent TOAST table autovac settings
Next
From: Simon Riggs
Date:
Subject: Re: [HACKERS] autovacuum: use case for indenpedent TOAST table autovac settings