Re: Hints proposal

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Hints proposal
Date: 2006-10-12 16:22:10
Message-ID: b42b73150610120922x53bbc14atd9591f06f6e4e274@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On 10/12/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-10-12 16:24:16 Re: Hints proposal
Previous Message Tom Lane 2006-10-12 16:19:24 SQL functions, INSERT/UPDATE/DELETE RETURNING, and triggers

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-10-12 16:24:16 Re: Hints proposal
Previous Message Heikki Linnakangas 2006-10-12 15:55:17 Re: Hints proposal