Re: Simple join optimized badly? - Mailing list pgsql-performance

From Tom Lane
Subject Re: Simple join optimized badly?
Date
Msg-id 9723.1160433916@sss.pgh.pa.us
Whole thread Raw
In response to Re: Simple join optimized badly?  ("Jim C. Nasby" <jim@nasby.net>)
Responses Re: Simple join optimized badly?  ("Jim C. Nasby" <jim@nasby.net>)
List pgsql-performance
"Jim C. Nasby" <jim@nasby.net> writes:
> One of the big problems with doing set enable_...=off is that there's no
> way to embed that into something like a view, so you're almost forced
> into putting into the application code itself, which makes matters even
> worse. If you could hint this within a query (maybe even on a per-table
> level), you could at least encapsulate that into a view.

You've almost reinvented one of the points that was made in the last
go-round on the subject of hints, which is that keeping them out of the
application code is an important factor in making them manageable by a
DBA.  Hints stored in a system catalog (and probably having the form of
"make this statistical assumption" rather than specifically "use that
plan") would avoid many of the negatives.

            regards, tom lane

pgsql-performance by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Simple join optimized badly?
Next
From: Brian Herlihy
Date:
Subject: Re: Simple join optimized badly?