pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Merlin Moncure <mmoncure@gmail.com>
To: pgsql-hackers@postgresql.org
Cc: Jim C. Nasby <jim@nasby.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Hints proposal
Date: Thu, 12 Oct 2006 12:22:10 -0400
Message-ID: <b42b73150610120922x53bbc14atd9591f06f6e4e274@mail.gmail.com> (raw)
In-Reply-To: <10866.1160667752@sss.pgh.pa.us>
References: <20061012151439.GT28647@nasby.net>
	<10866.1160667752@sss.pgh.pa.us>

On 10/12/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> [ This is off-topic for -performance, please continue the thread in
> -hackers ]

> This proposal seems to deliberately ignore every point that has been
> made *against* doing things that way.  It doesn't separate the hints
> from the queries, it doesn't focus on fixing the statistical or cost
> misestimates that are at the heart of the issue, and it takes no account
> of the problem of hints being obsoleted by system improvements.

what about extending the domain system so that we can put in ranges
that override the statistics or (imo much more importantly) provide
information when the planner would have to restort to a guess. my case
for this is prepared statements with a parameterized limit clause.

prepare foo(l int) as select * from bar limit $1;

maybe:
create domain foo_lmt as int hint 1; -- probably needs to be fleshed out
prepare foo(l foolmt) as select * from bar limit $1;

this says: "if you have to guess me, please use this"

what I like about this over previous attempts to persuade you is the
grammar changes are localized and also imo future proofed. planner can
ignore the hints if they are not appropriate for the oparation.

merlin



view thread (74+ messages)  latest in thread

Message-ID: <b42b73150610120922x53bbc14atd9591f06f6e4e274@mail.gmail.com>
Permalink:  ../b42b73150610120922x53bbc14atd9591f06f6e4e274@mail.gmail.com/
Also on:    postgresql.org/message-id/b42b73150610120922x53bbc14atd9591f06f6e4e274@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mmoncure@gmail.com, pgsql-hackers@postgresql.org, jim@nasby.net
  Subject: Re: Hints proposal
  In-Reply-To: <b42b73150610120922x53bbc14atd9591f06f6e4e274@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox