From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sorin Dudui <sd@wigeogis.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: where clause + function, execution order
Date: Fri, 11 Nov 2011 11:00:15 -0500
Message-ID: <5921.1321027215@sss.pgh.pa.us> (raw)
In-Reply-To: <13DE38ECCB7CE74890E7150A7CCB610D3642DD47@exc1.wigeo.lan>
References: <13DE38ECCB7CE74890E7150A7CCB610D3642DD47@exc1.wigeo.lan>
Sorin Dudui <sd@wigeogis.com> writes:
> I am wondering when the where clause (a.x = 'value') is executed. After the select statement in the function finishes? Or is it appended at the select statement in the function?
EXPLAIN is your friend ...
In this case the function looks inline-able, so reasonably recent
versions of PG should do what you want.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, sd@wigeogis.com
Subject: Re: where clause + function, execution order
In-Reply-To: <5921.1321027215@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox