Re: Function execution costs 'n all that - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Function execution costs 'n all that
Date
Msg-id 20907.1168964036@sss.pgh.pa.us
Whole thread Raw
In response to Re: Function execution costs 'n all that  (Gregory Stark <gsstark@mit.edu>)
Responses Re: Function execution costs 'n all that  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Gregory Stark <gsstark@mit.edu> writes:
> I imagine you've thought of this already but just in case, the cost of the
> function call has to be combined with the selectivity to get this right. If
> you can do an expensive but very selective clause first and save 100 cheap
> calls that almost always return true it may still be worthwhile.

I've thought of it, but I haven't figured out a reasonable algorithm for
ordering the clauses in view of that.  Have you?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] Checkpoint request failed on version 8.2.1.
Next
From: Tom Lane
Date:
Subject: Re: Enabling autovacuum by default (was Re: Autovacuum improvements)