Re: [HACKERS] Hints proposal

From: "Bucky Jordan" <bjordan(at)lumeta(dot)com>
To: <josh(at)agliodbs(dot)com>, "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Cc: <pgsql-hackers(at)postgresql(dot)org>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: [HACKERS] Hints proposal
Date: 2006-10-12 21:19:29
Message-ID: 78ED28FACE63744386D68D8A9D1CF5D4209CA5@MAIL.corp.lumeta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

> > Well, one nice thing about the per-query method is you can post
before
> > and after EXPLAIN ANALYZE along with the hints.
>
> One bad thing is that application designers will tend to use the hint,
fix
> the immediate issue, and never report a problem at all. And query
hints
> would not be collectable in any organized way except the query log,
which
> would then require very sophisticated text parsing to get any useful
> information at all.
>
Or they'll report it when the next version of Postgres "breaks" their
app because the hints changed, or because the planner does something
else which makes those hints obsolete.

My main concern with hints (aside from the fact I'd rather see more
intelligence in the planner/stats) is managing them appropriately. I
have two general types of SQL where I'd want to use hints- big OLAP
stuff (where I have a lot of big queries, so it's not just one or two
where I'd need them) or large dynamically generated queries (Users
building custom queries). Either way, I don't want to put them on a
query itself.

What about using regular expressions, plus, if you have a function
(views, or any other statement that is stored), you can assign a rule to
that particular function. So you get matching, plus explicit selection.
This way it's easy to find all your hints, turn them off, manage them,
etc. (Not to mention dynamically generated SQL is ugly enough without
having to put hints in there).

- Bucky

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2006-10-12 21:23:46 Re: Hints WAS: Index Tuning Features
Previous Message Arjen van der Meijden 2006-10-12 21:07:12 Re: Hints proposal

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-10-12 21:28:48 Re: Hints proposal
Previous Message Arjen van der Meijden 2006-10-12 21:07:12 Re: Hints proposal