Re: Question about simple function folding optimization - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Question about simple function folding optimization
Date
Msg-id Pine.LNX.4.44.0304110345140.2212-100000@peter.localdomain
Whole thread Raw
In response to Re: Question about simple function folding optimization  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Question about simple function folding optimization
List pgsql-hackers
Tom Lane writes:

> But I wonder whether any better answer is possible.  I don't want to
> give up on the inlining optimization --- anyone see another fix?

If a functional index applies to the function, generate one plan with the
function inlined and one with the function call left in, and then plan
away as usual.  While that could blow up the number of plan choices to
consider (which would have to be controlled in some way), this would give
the best end results because the planner could consider the choice knowing
what the function results are used for.

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Alice Lottini
Date:
Subject: Integration with Access Method interface
Next
From: Tom Lane
Date:
Subject: Re: Integration with Access Method interface