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

From Jeff Davis
Subject Re: Function execution costs 'n all that
Date
Msg-id 1169080673.19505.2.camel@dogma.v10.wvs
Whole thread Raw
In response to Re: Function execution costs 'n all that  (Neil Conway <neilc@samurai.com>)
Responses Re: Function execution costs 'n all that  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 2007-01-15 at 13:54 -0500, Neil Conway wrote:
> On Mon, 2007-01-15 at 10:51 -0800, Richard Troy wrote:
> > I therefore propose that the engine evaluate -
> > benchmark, if you will - all functions as they are ingested, or
> > vacuum-like at some later date (when valid data for testing may exist),
> > and assign a cost relative to what it already knows - the built-ins, for
> > example.
> 
> That seems pretty unworkable. It is unsafe, for one: evaluating a
> function may have side effects (inside or outside the database), so the

Would any form of cost estimate have meaning if the function has side
effects? If it's a volatile function, doesn't that mean that the planner
can't avoid or favor executing it?

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: Gavin Sherry
Date:
Subject: Re: Design notes for EquivalenceClasses
Next
From: Tom Lane
Date:
Subject: Re: Design notes for EquivalenceClasses