Skip site navigation (1) Skip section navigation (2)

Re: where clause + function, execution order

From: Richard Huxton <dev(at)archonet(dot)com>
To: Julius Tuskenis <julius(at)nsoft(dot)lt>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: where clause + function, execution order
Date: 2011-11-11 15:59:49
Message-ID: 4EBD4675.2060604@archonet.com (view raw or flat)
Thread:
Lists: pgsql-performance
On 11/11/11 15:54, Julius Tuskenis wrote:
> On 2011.11.11 17:38, Sorin Dudui wrote:
>> I have the following function:
>>
>> CREATE OR REPLACE FUNCTION xxx(text)
[snip]
>> LANGUAGE sql STABLE

> Function execute plan is prepared when creating it, so the "where"
> clause should check the function result not altering its execution..

Not true for SQL functions. They can be inlined, but I'm not sure if 
this one will be.

What does EXPLAIN ANALYSE show for this query?


-- 
   Richard Huxton
   Archonet Ltd

In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2011-11-11 16:00:15
Subject: Re: where clause + function, execution order
Previous:From: Julius TuskenisDate: 2011-11-11 15:54:00
Subject: Re: where clause + function, execution order

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group