Re: STABLE functions

From: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Philip Warner" <pjw(at)rhyme(dot)com(dot)au>
Cc: "Joachim Wieland" <jwieland(at)kawo2(dot)rwth-aachen(dot)de>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: STABLE functions
Date: 2003-04-28 07:51:05
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA4961F8D@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> The point at issue is that the "stable function" classification was
> defined and implemented to provide a semantically valid way of deciding
> whether it's safe to treat an expression as an indexscan qualifier.
> There is no code that attempts to do anything else with it.

So the problem at hand seems to be, that the optimizer treats the function
as beeing too cheap (does it apply a cost at all ?). Since this function was in
Pl/SQL it should actually be doable to estimate a cost for the function from
statistics.
Is there a working way to tell the optimizer that the function is expensive,
and thus make it prefer only evaluating it once ?

Andreas

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Sherry 2003-04-28 09:37:57 INSERT/UPDATE ... RETURNING
Previous Message Gavin Sherry 2003-04-28 05:37:17 Re: Prepared queries and ANALYZE