Re: [HACKERS] contrib/plantuner - enable PostgreSQL planner hints

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: decibel <decibel(at)decibel(dot)org>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, pgsql-general(at)postgresql(dot)org, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] contrib/plantuner - enable PostgreSQL planner hints
Date: 2009-10-16 20:35:47
Message-ID: 1255725347.30077.157.camel@monkey-cat.sm.truviso.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Davis 2009-10-16 20:55:06 Re: Urgent Help required
Previous Message marcin mank 2009-10-16 20:31:23 Re: Partitioned tables as a poor mans columnar index?

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2009-10-17 00:24:57 Re: Encoding issues in console and eventlog on win32
Previous Message Christophe Pettus 2009-10-16 19:51:20 Re: contrib/plantuner - enable PostgreSQL planner hints