Re: contrib/plantuner - enable PostgreSQL planner hints - Mailing list pgsql-general

From decibel
Subject Re: contrib/plantuner - enable PostgreSQL planner hints
Date
Msg-id 47E63672-972E-452C-AFBE-37C3C883D9FC@decibel.org
Whole thread Raw
In response to contrib/plantuner - enable PostgreSQL planner hints  (Oleg Bartunov <oleg@sai.msu.su>)
Responses Re: contrib/plantuner - enable PostgreSQL planner hints
Re: [HACKERS] contrib/plantuner - enable PostgreSQL planner hints
Re: contrib/plantuner - enable PostgreSQL planner hints
List pgsql-general
On Oct 6, 2009, at 2:57 PM, Oleg Bartunov wrote:
> this is an announcement of our new contribution module for
> PostgreSQL - Plantuner - enable planner hints
> (http://www.sai.msu.su/~megera/wiki/plantuner).
>
> =# set enable_seqscan=off;
> =# set plantuner.forbid_index='id_idx2';


Out of curiosity, did you look at doing hints as comments in a query?
I'm guessing you couldn't actually do that in just a contrib module,
but it's how Oracle handles hints, and it seems to be *much* more
convenient, because a hint only applies for a specific query. I think
it's extremely unlikely you would intentionally want the same hint to
apply to a bunch of queries, and extremely likely that you could
accidentally forget to re-enable something.

That said, thanks for contributing this!
--
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828



pgsql-general by date:

Previous
From: decibel
Date:
Subject: Re: Inheritance on foreign key
Next
From: Christophe Pettus
Date:
Subject: Re: contrib/plantuner - enable PostgreSQL planner hints