Re: Planner hints in Postgresql

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Atri Sharma <atri(dot)jiit(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Johnston <polobo(at)yahoo(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Planner hints in Postgresql
Date: 2014-03-17 17:28:21
Message-ID: 20140317172821.GK26394@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Atri Sharma (atri(dot)jiit(at)gmail(dot)com) wrote:
> Isnt using a user given value for selectivity a pretty risky situation as
> it can horribly screw up the plan selection?
>
> Why not allow the user to specify an alternate plan and have the planner

Uh, you're worried about the user given us a garbage selectivity, but
they're going to get a full-blown plan perfect?

> assign a higher preference to it during plan evaluation? This shall allow
> us to still have a fair evaluation of all possible plans as we do right now
> and yet have a higher preference for the user given plan during evaluation?

What exactly would such a "preference" look like? A cost modifier?
We'd almost certainly have to make that into a GUC or a value passed in
as part of the query, with a high likelihood of users figuring out how
to use it to say "use my plan forever and always"..

Thanks,

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Johnston 2014-03-17 17:28:40 Re: Planner hints in Postgresql
Previous Message Robert Haas 2014-03-17 17:26:26 Re: Portability issues in shm_mq