Mark Kirkwood wrote:
The result? I can't use my function in any WHERE clause that involves
any other conditions or joins. Only by itself. PG will occasionally
decide to use my function as a filter instead of doing the join or the
other WHERE conditions first, and I'm dead.
this is an argument for cost-for-functions rather than hints AFAICS.
Perhaps you scanned past what I wrote a couple paragraphs farther down. I'm going to repeat it because it's the KEY POINT I'm trying to make:
Craig James wrote:
Now you might argue that function-cost needs to be added to the
optimizer's arsenal of tricks. And I'd agree with you: That WOULD be a
better solution than hints. But I need my problem solved TODAY, not
next year. Hints can help solve problems NOW that can be brought to the
PG team's attention later, and in the mean time let me get my
application to work.
Craig