Re: performance issue: logical operators are slow inside SQL function: missing optimalization? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: performance issue: logical operators are slow inside SQL function: missing optimalization?
Date
Msg-id 17549.1283095409@sss.pgh.pa.us
Whole thread Raw
In response to Re: performance issue: logical operators are slow inside SQL function: missing optimalization?  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: performance issue: logical operators are slow inside SQL function: missing optimalization?  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: performance issue: logical operators are slow inside SQL function: missing optimalization?  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2010/8/29 Tom Lane <tgl@sss.pgh.pa.us>:
>> The one case is inline-able and the other not (because it would result
>> in double evaluation of the volatile function random()).
>> See EXPLAIN VERBOSE.

> I understand now. So it means general advice - don't use a boolean
> operators in SQL function? This issue should be documented somewhere?

It has nothing to do with boolean operators, just double evaluation.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: performance issue: logical operators are slow inside SQL function: missing optimalization?
Next
From: Pavel Stehule
Date:
Subject: Re: performance issue: logical operators are slow inside SQL function: missing optimalization?