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

From Craig A. James
Subject Re: Simple join optimized badly?
Date
Msg-id 4529B7E8.8080606@modgraph-usa.com
Whole thread Raw
In response to Re: Simple join optimized badly?  (Mark Kirkwood <markir@paradise.net.nz>)
Responses Re: Simple join optimized badly?
List pgsql-performance
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
POINTI'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


pgsql-performance by date:

Previous
From: "Craig A. James"
Date:
Subject: Re: Simple join optimized badly?
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Performance Optimization for Dummies 2 - the SQL