Re: [PERFORM] Hints proposal

Поиск
Список
Период
Сортировка
От Bucky Jordan
Тема Re: [PERFORM] Hints proposal
Дата
Msg-id 78ED28FACE63744386D68D8A9D1CF5D4209CA5@MAIL.corp.lumeta.com
обсуждение исходный текст
Ответ на Re: [PERFORM] Hints proposal  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: [PERFORM] Hints proposal  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
> > 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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: [PERFORM] Hints proposal
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Hints WAS: Index Tuning Features