Re: An Idea for planner hints - Mailing list pgsql-hackers

From Tom Lane
Subject Re: An Idea for planner hints
Date
Msg-id 19477.1155130933@sss.pgh.pa.us
Whole thread Raw
In response to Re: An Idea for planner hints  ("Florian G. Pflug" <fgp@phlo.org>)
Responses Re: An Idea for planner hints
List pgsql-hackers
"Florian G. Pflug" <fgp@phlo.org> writes:
> Image a complex, autogenerated query with looks something like this
> select ....
> from t1
> join t2 on ...
> join t3 on ...
> join t4 on ...
> ...
> ...
> where
>    <big, complicated expression derived from some user input>.

> This big, complicated expression looks different for every query - and
> currently, postgres often vastly overestimates the selectivity of this
> expression.

This is a straw man.  There is no way that your application can throw in
a chosen-at-random selectivity value for a join condition that it
doesn't understand and have that be more likely to be right than the
planner's guess.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: 8.2 features status
Next
From: Tom Lane
Date:
Subject: Re: Casts