pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andriy Tkachuk <ant@imt.com.ua>
Cc: pgsql-performance@postgresql.org
Subject: Re: IMMUTABLE function's flag do not work: 7.3.4, plpgsql
Date: Wed, 08 Oct 2003 18:22:32 -0400
Message-ID: <5442.1065651752@sss.pgh.pa.us> (raw)
In-Reply-To: <20031008152741.P17672-100000@pool.imt.com.ua>
References: <20031008152741.P17672-100000@pool.imt.com.ua>

Andriy Tkachuk <ant@imt.com.ua> writes:
> At second. calc_total() is immutable function:
> but it seems that it's not cached in one session:

It's not supposed to be.

The reason the "runtime" is small in your example is that the planner
executes the function call while preparing the plan, and this isn't
counted in EXPLAIN's runtime measurement.  There's no claim anywhere
that the results of such an evaluation would be saved for other plans.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <5442.1065651752@sss.pgh.pa.us>
Permalink:  ../5442.1065651752@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5442.1065651752@sss.pgh.pa.us

 · 

reply

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, ant@imt.com.ua
  Subject: Re: IMMUTABLE function's flag do not work: 7.3.4, plpgsql
  In-Reply-To: <5442.1065651752@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