Unix Technical Forum

Re: enforcing a plan (in brief)

This is a discussion on Re: enforcing a plan (in brief) within the pgsql Hackers forums, part of the PostgreSQL category; --> > And the user maintenance of updating those hints for every release of > PostgreSQL as we improve the ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 03:43 AM
Zeugswetter Andreas DAZ SD
 
Posts: n/a
Default Re: enforcing a plan (in brief)


> And the user maintenance of updating those hints for every release of
> PostgreSQL as we improve the database engine.


I don't think so. Basically an optimizer hint simply raises or lowers the cost
of an index, mandates a certain join order, allows or disallows a seq scan ...
Imho it is not so far from the things people currently do with the set seq_scan=
type of commands.
(I don't think actually giving a certain plan is a good idea)

A good optimizer hint system would imho not circumvent the optimizer, but only
give it hints. The hints should be very specifically aimed, like "an index on column x"
is going to be more expensive than you (the optimizer) think, if used with this query.
like: select /*+ avoid_index(atab atab_x0) */ * from atab ...

> > The people who are actually doing the work think their time is more
> > usefully spent on improving the planner's intelligence than on devising
> > ways to override it.


The subject of this mail and "override it" imho goes too far, I would like to
be able to give advice in the form of hints to the optimizer.

> One consistent problem is the planner not being able to handle this or
> that scenario. At this stage, the *best* way to improve the planner is to
> add the ability to place hints in the plan.

^^^^ sql statement

I agree.

Andreas

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:03 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com