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

From Jeff Davis
Subject Re: [HACKERS] contrib/plantuner - enable PostgreSQL planner hints
Date
Msg-id 1255725347.30077.157.camel@monkey-cat.sm.truviso.com
Whole thread Raw
In response to Re: contrib/plantuner - enable PostgreSQL planner hints  (decibel <decibel@decibel.org>)
List pgsql-general
On Fri, 2009-10-16 at 12:04 -0500, decibel wrote:
> 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.

If that's the only reason, that seems easy enough to solve by using SET
right before the query. SET LOCAL might be convenient if you want to
forget the setting after the query. Connection pool software will do a
RESET ALL anyway.

There are reasons that it might be convenient to use hints inside the
query itself -- for instance, if you want something to apply only to a
subquery. I'm still hoping that someone will come up with a more elegant
solution to solve that problem though.

Regards,
    Jeff Davis


pgsql-general by date:

Previous
From: marcin mank
Date:
Subject: Re: Partitioned tables as a poor mans columnar index?
Next
From: Raymond O'Donnell
Date:
Subject: Re: slightly off-topic: Central Auth