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

Re: cacheable stored functions?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Bill Moran <wmoran(at)potentialtech(dot)com>,pgsql-performance(at)postgresql(dot)org
Subject: Re: cacheable stored functions?
Date: 2004-02-20 16:01:28
Message-ID: (view raw or whole thread)
Lists: pgsql-performance
On Friday 20 February 2004 15:35, Bill Moran wrote:
> I'm converting a SQL application to PostgreSQL.  The majority of the logic
> in this application is in the stored functions in the database.
> Somewhere, I saw a reference to "WITH (iscachable)" for stored functions,
> looking again, I'm unable to find any reference to this directive.  I have
> a single function that is _obviously_ safe to cache using this, and it
> generates no errors or problems that I can see.
> Now I'm looking at a lot of other functions that, if cached, would speed
> up performance considerably.  Yet I'm reluctant to use this directive
> since I can't find documentation on it anywhere.

From memory, "iscachable" was replaced in version 7.3 by the three 
finer-grained settings IMMUTABLE, STABLE, VOLATILE.

I'm guessing the old behaviour is still there for backwards compatibility, but 
it's probably best to use the new versions.

  Richard Huxton
  Archonet Ltd

In response to


pgsql-performance by date

Next:From: Bill MoranDate: 2004-02-20 16:48:24
Subject: Re: cacheable stored functions?
Previous:From: Tomasz MyrtaDate: 2004-02-20 15:59:39
Subject: Re: cacheable stored functions?

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